Dealing with Limitations of Unity Regarding High Coordinate Values?

Hi,

I am currently making a 2d endless runner in Unity, the current implementation of which involves moving the camera at a constant rate while dynamically spawning the environment off-screen to the side of it. Unfortunately, this seems to cause some wonky issues after the camera passes the ~10,000 x value.

I have 2 ideas for a solution to this problem, and would like your guys’ input as to which one is better (and I’m open to other ideas, as well).

Solution 1: Continue moving the camera, but once the camera passes 9,999 “snap” it back to 0 along with the current environment on-screen; reset positions for upcoming spawning environment so it spawns in the proper location. This is a bit of a hack, but involves very little additional data overhead

Solution 2: Move the world, while keeping the camera in place. Has additional overhead of moving all the environment, but does not require any hack to make the game endless.

My first thought was that I’d be going with solution 2, but I’m thinking that solution 1 might be a lot faster as there is much less calculation to be done and you might still get physics to work.