VR flight sim floating point fun

Hi everyone,

I’m currently working on a basic flight sim implemented in Unity 2017.2 for GearVR. I’ve run into the typical floating point error problem: I need very accurate camera positioning but I’ve got very large (20k x 20k ) environments. I’ve used a script from the Unify wiki (see below) to reset the origin point periodically and it works a treat. However, every time the origin point gets reset, the frame rate drops horribly for a second. After that it’s fine, until the next reset.

http://wiki.unity3d.com/index.php?title=Floating_Origin

Is this likely to just be the increased overhead of repositioning everything? Or could it be something else? Has anyone else encountered this problem before?

Use the profiler to figure out what is crashing your framerate.
My guess would be the physics engine has to recache all the collider.
If you have figured out what part is it that affects you you can try to find a workaround.