how to make unlimited track for car racing game

I want to make a unlimited car racing game can any one please help me that how can i made a unlimited track so user while playing do not feel the repetition and enjoy the unlimited car race the track have turn etc any one can please guide me to a tutorial or anything that help me to start with all other things like car driving is ready now all i need is unlimited track idea how do i make it i will appreciate and kind of help and please help me everything is ready i want to complete the game … :slight_smile:

In most endless racing/running games, the world moves not the player and camera. If you want turns, it would be a lot more complicated because the world has to rotate. In pseudocode, I would do this:

var road : GameObject;
var speed : float;

function Update(){

road.instantiate(in front of player);
road.transform.position(0,0,speed * time.deltatime);

if(the road object get behind the player){
road.removeFromScene;
}

}

I have a funny solution to this, but it works:

  1. Make the road

  2. Put the car on the road

  3. Add script to the road that does nothing but animate the texture’s offset on the road’s material.

Yeah, the car doesn’t even move, lol. And everything else could be animated to come forward as the same axis as the car.