- Home /
Question by
FreeTimeDev · Feb 14, 2012 at 08:45 PM ·
instantiateworldtrack
Instantiating a track
I need help instantiating a "Track".
Eventually, I'd like to have an array of gameobjects that the game will randomly draw from to build a track for the player to follow.
Instead of player movement, I have this track move (the illusion of always running) towards the camera.
(In this case, (0,0,-2)).
I have a simple plane on top of a empty collision cube moving at 2 units a second. The plane is 10 units long--how can I instantiate the next plane so that there's no gap between sections of the track? Right now I'm toying with InvokeRepeating but I don't think unity is accurate enough to do it EXACTLY every 2.5 seconds which causes me to see gaps between the sections of track.
Any pearls of wisdom?
Comment
Your answer