- Home /
Oculus Rift camera shaking when far away from (0,0,0) position
I've got problem with camera shake issue when using OVR_CameraController prefab. When camera position is far away from (0,0,0) (i.e. 0,0, 50000) the objects close to camera start shaking (objects shakes more when camera is more far away). Is there any way to fix this issue? I am using Unity Pro 4.2.2f1 and Oculus SDK version ovr_unity_0.2.5c_lib.
Link to example project with this issue (it's only an ovr_cameracontroller prefab and a cube very clos to camera - after pushing space bar the camera and the cube moves 10k units) - http://speedy.sh/vp3Ay/NewOculusTest.zip
Link to youtube video - http://youtu.be/9rTU5b4q7fg
can you be looking for a solution like floating origin? If you are not familiar, I would advise to search for it.
Answer by FVANtom · Mar 29, 2014 at 11:49 AM
Second this. You can replicate it by simply placing a few objects at x 80000 y 80000 z 80000 and comparing that location with the origin. I did not manage to solve this yet. I suspect it's because of floating point precision errors.
Answer by FVANtom · Mar 29, 2014 at 11:49 AM
This post has an answer but I suspect you're not going to like it :p https://developer.oculusvr.com/forums/viewtopic.php?f=37&t=740#p94705
Quote: You don't fix this. GPU operate on single-precision floats, and this jitter is a result of vertex multiplication precision error.
You have to design the game so that the player is close to world center at all times. If your game design doesn't allow it, use programmatical tricks, such as re-locating the whole world closer to center.
This works for me: