review vr stuff, fix controller-ui ray casting
This commit is contained in:
@@ -22,7 +22,7 @@ struct QuestController : public VRController
|
||||
void update_state(double predictedDisplayTime, glm::vec3 head_pos)
|
||||
{
|
||||
vrapi_GetInputTrackingState(ovr_context, id, predictedDisplayTime, &tracking);
|
||||
glm::vec3 c_pos = glm::make_vec3((float*)&tracking.HeadPose.Pose.Position) - head_pos;
|
||||
glm::vec3 c_pos = glm::make_vec3((float*)&tracking.HeadPose.Pose.Position);
|
||||
auto c_rot_ovr = ovrMatrix4f_CreateFromQuaternion(&tracking.HeadPose.Pose.Orientation);
|
||||
auto c_rot_ovr_tp = ovrMatrix4f_Transpose(&c_rot_ovr);
|
||||
glm::mat4 c_rot = glm::make_mat4((float*)&c_rot_ovr_tp);
|
||||
|
||||
Reference in New Issue
Block a user