Forum Discussion
EpicZa
11 years agoHonored Guest
"kojack" wrote:Matrix4f ovrOrientation = Matrix4f(Quatf(eyeRenderPose[eye].Orientation).Inverted());
Why are you inverting the orientation of each eye pose? That would make it look in the opposite direction.
Ok I was doing it to reduce my problems from two to one axis'. But you got me thinking and here is what i've done now:
Matrix4f ovrOrientation = Matrix4f(Quatf(eyeRenderPose[eye].Orientation));// .Inverted();
glm::mat4 glmOrientation = fromOvr(ovrOrientation);
glm::mat4 invertOrientation = glm::mat4{ -1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, -1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f };
glmOrientation = glmOrientation * invertOrientation;
Rotations all work perfectly, just have to sort out the translations.
Cheerss!