Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
2EyeGuy's avatar
2EyeGuy
Adventurer
11 years ago

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:
		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;

2 Replies

  • Have you created a new profile with the latest version of the Config Util?

    I recall there was a bug with loading old profiles. Making a new profile and recalibrating should fix it.
  • I worked out where the problem is, and posted about it in the other thread about this bug (in the Community Support forum).

    BTW, even with the profile containing the correct neck values, there is a constant offset equal to the eye relief value added to the z coordinate, so I always have to subtract 6cm to get the camera in about the right place.