Skip to main content
Participant
November 21, 2016

OvrPlugin.ipd doesn't work on gear vr

Hey guys,

From Unity, it seems that the parameters "Stereo Separation" and Stereo Convergence" don't affect anythings. At least I didn't find the code that change any proprieties in the platform libs.
I tried to use OvrPlugin.ipd but it's doesn't work, always return the default ipd 64mm. it means that on gear vr the sdk lock the ipd? maybe because the hw can't change the ipd of lens? 

I have also the same problem with OVRProfile.eyeHeight. I need to change it but I can't find a way

Thanks
This topic has been closed for replies.

8 replies

Inspiring
November 21, 2016
OVRPlugin is not a public API. To scale the IPD, please scale the Camera as a whole by making it the child of a GameObject and setting Transform.localScale on that. The benefit to using scale instead of directly setting IPD is that head motion will match stereo separation, which is important for comfort.
Participant
November 22, 2016
do you have links ore references? how much scale?
for example, I'd like to reach 40mm, I have to scale the parent x to 0.625? (because the default is 63mm)
Participant
November 22, 2016
and what about OVRProfile.eyeHeight? to change it I have to scale the parent y?

Thanks
Inspiring
November 22, 2016
> do you have links ore references? how much scale? 

Here is the doc.

> I'd like to reach 40mm, I have to scale the parent x to 0.625? (because the default is 63mm)

The default varies per-user based on their calibration. Try this:
    rig.trackingSpace.localScale = Vector3.one * (0.04f / Vector3.Distance(rig.leftEyeAnchor.position, rig.rightEyeAnchor.position));

> what about OVRProfile.eyeHeight?

OVRProfile.eyeHeight is currently hard-coded to return an average height across all users. If you want to use another value, set OVRPlayerController.useProfileData = false and then set the Y position of the OVRCameraRig to whatever you want.
Participant
November 24, 2016
Thanks man.

the last question, what exactly means eyeDepth, it looks like stereo convergence? and if so how to change it in gear vr.

Inspiring
November 24, 2016
There is no stereo convergence setting. The cameras need to point parallel to match the optics of the VR headset. Eye depth is the z distance between the center of head rotation (the base of your neck) and the camera position (your eye). Again, on Gear VR this is hard-coded to an average value for all users.
Participant
November 25, 2016
Thanks for your great help :)
Up and Coming
September 11, 2018
This post came up while doing some Googling. I found setting a custom IPD for the Rift to work in Unity 2018.2.0f1 with the follow:

        float myDreamIpd = 0.042f; // enter the IPD in meters
        var leftEye = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.LeftEye);
        var rightEye = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.RightEye);
        float hardwareIpd = Vector3.Distance(leftEye, rightEye);

        float scale = myDreamIpd / hardwareIpd;
        Camera.main.transform.localScale = new Vector3(scale, 1, 1);