Model 'wobble' far from origin

I’m building an ‘endless runner’ style game and I’ve noticed that the longer it runs (i.e. the further from world origin it gets), the more wobbly the main model seems to get. Is this a known problem? It also seems to happen when the model is converted to a dynamic rigidbody and back.

Please see video for a more accurate idea of the problem, I’m not sure how else to describe it haha

Any suggestions to stop/correct this would be greatly appreciated.

Hi @hearsepileup,

That’s a common problem in many realtime 3D rendering engines, Unity has a similar problem when moving too far from origin. The reason is the larger the numbers used for positioning, the less floating point precision you have.

The most common solution to this problem is to offset your world back to a position close to the world zero. If you offset both the scene models and the camera there is usually no visual glitch and it’s transparent to the user.

We are doing something similar each time you hop from one island to the other in Aritelia:

2 Likes

I suspected it might be something like this, I remember seeing Mobius Digital talking about these kinds of issues with The Outer Wilds… Here’s hoping not too much of my code relies on global positioning!

1 Like

Hi @Leonidas, could you shed some light on this topic?
I’ve just noticed this issue today.

Hey @Newbie_Coder, essentially it’s a rounding error - the further away you get from point 0,0,0 in your engine the more likely it is for these things to be an issue. The best way may be to have regular ways of constraining how far your important stuff gets from the origin - I’ve seen some pretty funky stuff to make that work!