I make a scene that has platform and everything, drag it under one GameObject and make a prefab out of it. After that I instantiate it ahead of the camera. This is the only method I know but it might be helpful if you can share your method with me.
Hi GTHell!
I will answer your question by another question, which type of view do you use?
(Top view/ Third person view/Side view/…)
Each type of view will have his own constraint and it depend if it’s a 3D or 2D runner too.
There are a lot of way to do it, but you must think at some point to “optimize” depending if you want it for PC/Smartphone/Web/…
I saw different topic about it:
- some make the floor move and not the “runner” so the runner is always at the same place and just jump when needed.
- other make the track loop and change the tiles when needed (running in circle)
- some make the runner move forward until a limit and then teleport all the scene back to (0,0,0) position. The reason is simple, if you go foward during a long time, you runner will end in very high position and this will result in precision problem in the unity (all is going to shake mostly ) so to avoid that, you set a limit and then when it has been reached by the runner, you teleport everything to his relative position from (0,0,0) and continue like this…
There are a lot of topics on the web about that, the rest just depend of you and what you really want.
Hope it helped
Crizz
I want to make a 2D side scrolling endless runner. I make a spawn point of the platform by taking the screen size and time 2 so it will fit all the scree resolution. (Screen size * 2 = instantiate point).
I’m thinking about game like Alto android game because it doesn’t look like it using spawn method at all. It’s like random drawing line down the hill.