From cfa20b6eb3e86ce72a1b37fd3b3409060740a1c5 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 8 Jan 2018 15:28:59 -0800 Subject: [PATCH] Oculus Touch: More accurate spin on thrown objects The internal computation of angular velocity was incorrect. Apparently, the ovrPoseStatef.AngularRotation is not in sensor frame but local to the controller rotation. (cherry picked from commit dd0e57026e123779784102658a264f6aaeb70f67) --- plugins/oculus/src/OculusHelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/oculus/src/OculusHelpers.cpp b/plugins/oculus/src/OculusHelpers.cpp index 3d06a4b223..4632c8ab76 100644 --- a/plugins/oculus/src/OculusHelpers.cpp +++ b/plugins/oculus/src/OculusHelpers.cpp @@ -262,7 +262,7 @@ controller::Pose ovrControllerPoseToHandPose( pose.translation = toGlm(handPose.ThePose.Position); pose.translation += rotation * translationOffset; pose.rotation = rotation * rotationOffset; - pose.angularVelocity = toGlm(handPose.AngularVelocity); + pose.angularVelocity = rotation * toGlm(handPose.AngularVelocity); pose.velocity = toGlm(handPose.LinearVelocity); pose.valid = true; return pose;