fix depth export, improve VR UI interaction

This commit is contained in:
2019-06-02 14:10:01 +02:00
parent e5c7a35fd2
commit d8a1a99d04
6 changed files with 93 additions and 97 deletions

View File

@@ -24,7 +24,8 @@ struct QuestController : public VRController
vrapi_GetInputTrackingState(ovr_context, id, predictedDisplayTime, &tracking);
glm::vec3 c_pos = glm::make_vec3((float*)&tracking.HeadPose.Pose.Position) - head_pos;
auto c_rot_ovr = ovrMatrix4f_CreateFromQuaternion(&tracking.HeadPose.Pose.Orientation);
glm::mat4 c_rot = glm::make_mat4((float*)&c_rot_ovr);
auto c_rot_ovr_tp = ovrMatrix4f_Transpose(&c_rot_ovr);
glm::mat4 c_rot = glm::make_mat4((float*)&c_rot_ovr_tp);
m_mat = glm::translate(c_pos) * c_rot;
// update controllers