I'm working on my first project on Unity 3D, I'm making an endless racing 3D. I took a highway asset from the Unity Store. The road isn't straight, it has many curves and is very long. I would ask you: how do I make the road endless?
Asked
Active
Viewed 446 times
1
-
Do you mean repeat the same road endlessly? – Siddharth Aug 14 '21 at 15:05
-
@Siddharth yess – bova1973 Aug 14 '21 at 16:45
-
Then you can create duplicate of Gameobject in c# script. Please refer the unity manual.@bova1973 – Siddharth Aug 15 '21 at 02:33
1 Answers
0
You can create a few patterns, and all of this patterns can start and end with straight road, so you can design however u want between this two straight road :) after you create 5-10 patterns like this after that you can instantiate this patterns behind and behind so i think this will work four you :)

FurkanOzkan
- 1
- 3
-
you mean i have to add a lot of patterns in a row and then I copy and paste them? – bova1973 Aug 14 '21 at 17:47
-
actually no need to "a loth" just create 10 different pattern and after that you can randomly spawn that patterns with instantiate, just an idea :) i dont know any "easy" solution for this, or you can create an algorithm like "if you spawn x object and after that u create y object than change y objects position and rotation for this" this will be little bit more long and complex but it can be work or just use my first advice :D no one can understand same patterns in game because peoples will focus the game :D i hope i can help ^^ – FurkanOzkan Aug 14 '21 at 17:53