This takes a lot of assumptions, but I have seen quite a few people ask about it myself. I’ve come up with a “hybrid” work around, but don’t have the time or equipment to test it at the immediate moment.
So, given a large area of space, eg a solar system, Unity runs into floating point precision calculation issues. Existing Solutions:
- Double precision converted back to float for unity transforms
- A series of grids with sub-coordinate system
- Moving the universe around you (Futurama method)
My proposed solution (The jumpy treadmill solution):
Take unity’s “precise” area of about 10000x10000x10000, upon the player reaching one side, jump coordinates of all environmental/player objects to place them around the origin again. This removes the need to call a transform change on every single game object every frame, but may cause issues with movement and physics (would appreciate feedback here).
Additional considerations:
With a large system, there is little point in carrying out physics operations on objects that are far away, so culling the invisibly small objects would reduce the cost of calculations when hitting a triggering border at the edge of precise space.
The solution here would be to record the state of the game object as soon as it is culled and delete the game object, and restore it when it’s at it’s lowest LOD.
I’m not exactly experienced, so I would appreciate it if someone could start poking holes in my idea. If all looks good I may attempt an implementation.