Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Gasteclair's avatar
Gasteclair
Explorer
8 years ago

How to get current interpupillary distance in c++? with libOVR

Maybe I will look idiot, but what is libOVR method to get current ipd? [C++, ovr_sdk 1.24]

2 Replies

  • For version 1.26 I've found this solution:

     

     

    ovrEyeRenderDesc lerd = ovr_GetRenderDesc(hmd, ovrEye_Left, hmdDesc.DefaultEyeFov[0]);
    ovrEyeRenderDesc rerd = ovr_GetRenderDesc(hmd, ovrEye_Right, hmdDesc.DefaultEyeFov[0]);
    
    float ipd = abs(lerd.HmdToEyePose.Position.x) + abs(rerd.HmdToEyePose.Position.x);

     

     


    I'm using a Rift S which has software IPD, so I don't know if it works with older models as well. If you multiply by 1000, you should get to millimetres.