cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

robinson_smith_
Honored Guest
no

vhv-developer
Explorer

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.