Hi ya’ll
I wanna create an endless runner game where the player does not change direction (unlike temple run).
What I wanna know is if I move both the player and the camera, will that affect the game performance if the player goes really far along the Z axis? coz I know that’s a tad easier to create then moving the terrain and obstacles underneath the player…
If you run thousands of kilometers away from the origin, you’ll start to run into floating-point precision issues.
But let’s say your guy runs 10 km/hr… the player would have to run continuously for over 4 days to reach even 1000 km.
So, you can probably just move the camera and not worry about it.
If it later proves to be a problem, you can just periodically move everything back towards the origin – say, every 100 km or so (which would still take 10 hours at the above rate!).