Scrolling Level

Im trying to think of a way to create a scrolling level and need some help on the best way to do it, plus a little code help if possible?

About the game:

I have a tank which can move in all directions with the WSAD keys, Id like the level to automatically scroll forcing the tank forward, while the level moves my tank is able to move forward backwards and side to side in all directions but if the tank hangs back to far the scrolling level will keep going forward essentially pushing me (the tank) forward. So the level is constantly or always moving forward as I move and react in that space.

Also my camera is attached to the tank in a 3rd person view somewhat behind the tank.

Im stumped on how to achieve the scrolling level part while pushing the tank forward? Does anyone have any thoughts on the best way to achieve this?

My initial thought is to somehow move the level itself backwards with a certain speed or velocity to give the feel of being pushed forward but how would I constrain the tank to get pushed forward?

Or I guess I wouldn’t have to worry about constraining the tank because the level would be moving backwards, Im thinking I would have to make it so the tank can only go a certain distance forward while the level goes backwards.

Would this be a good approach or is there a better way?

The more I think about it the more confused I get LOL I sure hope someone can help Im stumped.

Cheers! Zeek

Ive been searching for the last few hours and finally stumbled on a way to make the scrolling background work and my initial thought was correct. So heres the Code (I tried converting it into Javascript, but kept getting errors? so C# it is):

using UnityEngine;
using System.Collections;

public class ScrollingBackground : MonoBehaviour
{
public float Speed;

// Update is called once per frame
void Update ()
{
float amtToMove = Speed * Time.deltaTime;
transform.Translate(Vector3.down * amtToMove, Space.World);

if (transform.position.y < -96.00)
{
transform.position = new Vector3(transform.position.x, 100f, transform.position.z);
}
}
}

My next step is to figure out how to make it so that my tank can “only” move forward a certain distance ??? So back to the hunt!

Also Im thinking after that Im gonna have some real problems figuring out how to add in the Enemies because if the background is scrolling and keeps repeating itself theres no place to have the enemies sit and wait?

Unless I create a super large or long background then I suppose I could have the enemies sitting and waiting until my tank gets in view to come alive, but I like the idea of a scrolling/repeating background better because its less work.

Is there any pro’s out there that can shed some light on the topic?

Cheers!