From d04b36bf48166f7cab7a2c4a9695a500ea05b69b Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Fri, 1 Nov 2013 14:25:26 -0700 Subject: [PATCH] Fix for GuyFinal rotation. --- interface/src/avatar/FaceModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/avatar/FaceModel.cpp b/interface/src/avatar/FaceModel.cpp index c263e59dbd..284ac3b268 100644 --- a/interface/src/avatar/FaceModel.cpp +++ b/interface/src/avatar/FaceModel.cpp @@ -50,7 +50,7 @@ void FaceModel::maybeUpdateNeckRotation(const JointState& parentState, const FBX // get the rotation axes in joint space and use them to adjust the rotation glm::mat3 axes = glm::mat3_cast(_rotation); glm::mat3 inverse = glm::mat3(glm::inverse(parentState.transform * - joint.preTransform * glm::mat4_cast(joint.preRotation * joint.rotation))); + joint.preTransform * glm::mat4_cast(joint.preRotation))); state.rotation = glm::angleAxis(-_owningHead->getRoll(), glm::normalize(inverse * axes[2])) * glm::angleAxis(_owningHead->getYaw(), glm::normalize(inverse * axes[1])) * glm::angleAxis(-_owningHead->getPitch(), glm::normalize(inverse * axes[0])) * joint.rotation;