Showing results for 
Search instead for 
Did you mean: 

How To Disable Eye To Neck Distance in Unity

Honored Guest

i am using the OVRCameraRig in my Avatar, but on rotating the oculus the Left/Center/RightAnchor is rotating around some invisible neck anchor in a very strange way.
I've tried to Disable Personalized Rendering For This Eye Position in the Oculus Configuration Utility but this setting has no effect in Unity. I can minimize this rotation behavior by decreasing the horizontal an vertical Eye to Neck Distance to 10,0mm but it is still there.

Is there a way to disable the neck model of the oculus?

I've tried to overwrite the Eye To Neck Distance to 0.0f in the OVR-Scripts but these class members are all read-only.

Thanks for your help!

Honored Guest
What's your goal? Could you just rotate the player to achieve the same result?

Grand Champion
There is a way to disable this but, in most cases, you should leave it be. The fact that it is acting strange for you is probably an indication that you are doing something else wrong (i.e. your models are not at the correct 1:1m scale).

Honored Guest
Thank you for answer!

Yes, my model is scaled to 1.0. I want to rotate my avatar and head myself. If I just rotate the player the oculus cams position is not exact at the eye position of the model.
I'm wondering why there isnt an option to disable this neck model. Because the neck anchor isnt visible and this makes it very uncomfortable to use.
So is there a way to disable it?


Expert Protege
If you are referring to rotating the player with the joystick, you can just write your own rotation code. Disabling the head neck model just for that would cause lots of other problems, and wouldn't actually solve yours. As the player leans around the axis of rotation changes relative to the eye.

Try the Transform.RotateAround function. Though keep in mind rotating the player about an arbitrary point means possible collisions.

Honored Guest
I am aware that this can cause other problems. But maybe I havn't explained good enough what I want to do.
I just want that the Oculus rotates the camera (specifically the left and rigth camera). And when rotating the Oculus the CenterEyeAnchor shouldn't be moved by the neck model.
I know that the left and right camera positions have to move around this center anchor depending on the Oculus rotation and IPD. But could you tell me the way how can I disable that the CenterEyeAnchor is moving when rotating the Oculus?
I don't need this neck model except the IPD movements and rotations because I would like to set this position by myself.

Thank you!

Grand Champion
Go in OVRCameraRig.cs, in UpdateAnchors(), around line 141 (right before the "if (UpdatedAnchors != null)" line) and add the following code to remove the head-neck model:

// remove head-neck model
leftEyeAnchor.localPosition -= centerEyeAnchor.position - transform.position;
rightEyeAnchor.localPosition -= centerEyeAnchor.position - transform.position;

This will also disable positional tracking as well it seems.

Honored Guest
Thanks a lot! It works now.

But I had to change your code snippet a little bit:

// remove head-neck model
leftEyeAnchor.position -= centerEyeAnchor.position - transform.position;
rightEyeAnchor.position -= centerEyeAnchor.position - transform.position;


Not applicable
I tested and this solution did not work for new Unity/Oculus Utilities versions. Any tips about it?
I really need disable Eye To Neck Distance.

Seems that disable the "Use Position Tracking" and Disable the Use IPD in Position Tracking did the trick for my case (GearVR)