Head-neck model not working!
I can't get the head-neck model to work.
I'm currently using ovrHmd_GetSensorState. The pose translation always returns 5.7cm for Z and 0 for X and Y (with some microscopic changes if I use prediction).
ViewAdjust always returns half my IPD for X and 0 for Y and Z.
Now, I can understand ViewAdjust, since that is meant to be multiplied by the Look matrix. But what's up with the translation?
What I expected the pose translation to return is the current position (in real-world space) half way between my two eyes minus the starting position of half way between my eyes when looking forward, either assuming that I am keeping my body still and turning from the neck, or assuming that I am keeping my waist still and turning with a combination of my neck and my spine.
However, instead I get a value that's always wrong and simply moves the camera forward or backward a constant amount depending on how I interpret it.
I believe I am using the SDK 0.3.2 preview.
Here is how I initialize the SDK:
Here is how I read the values:
I'm currently using ovrHmd_GetSensorState. The pose translation always returns 5.7cm for Z and 0 for X and Y (with some microscopic changes if I use prediction).
ViewAdjust always returns half my IPD for X and 0 for Y and Z.
Now, I can understand ViewAdjust, since that is meant to be multiplied by the Look matrix. But what's up with the translation?
What I expected the pose translation to return is the current position (in real-world space) half way between my two eyes minus the starting position of half way between my eyes when looking forward, either assuming that I am keeping my body still and turning from the neck, or assuming that I am keeping my waist still and turning with a combination of my neck and my spine.
However, instead I get a value that's always wrong and simply moves the camera forward or backward a constant amount depending on how I interpret it.
I believe I am using the SDK 0.3.2 preview.
Here is how I initialize the SDK:
if (ovrHmd_StartSensor(hmd, ovrSensorCap_Orientation | ovrSensorCap_Position | ovrSensorCap_YawCorrection, 0))
Here is how I read the values:
ovrGLConfig cfg;
cfg.OGL.Header.API = ovrRenderAPI_OpenGL;
cfg.OGL.Header.RTSize.w = hmdDesc.Resolution.w;
cfg.OGL.Header.RTSize.h = hmdDesc.Resolution.h;
cfg.OGL.Header.Multisample = 0;
#ifdef _WIN32
cfg.OGL.Window = EmuWindow::GetWnd();
#endif
ovrHmd_ConfigureRendering(hmd, &cfg.Config, ovrDistortionCap_Chromatic | ovrDistortionCap_TimeWarp,
g_eye_fov, g_eye_render_desc);
ovrSensorState ss = ovrHmd_GetSensorState(hmd, g_rift_frame_timing.ScanoutMidpointSeconds);
if (ss.StatusFlags & (ovrStatus_OrientationTracked | ovrStatus_PositionTracked))
{
OVR::Transformf pose = ss.Predicted.Pose;
