Skip to main content
Participant
April 12, 2018

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

    New Participant
    April 16, 2018
    no
    Participant
    July 30, 2021

    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.