From 3b062b7a31e334c73cc1d52add8be82f157b19bd Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 25 Jan 2016 18:47:45 -0800 Subject: [PATCH] AnimClip: special case the translation on the eyes --- libraries/animation/src/AnimClip.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/animation/src/AnimClip.cpp b/libraries/animation/src/AnimClip.cpp index 32da64808b..0ab83c1870 100644 --- a/libraries/animation/src/AnimClip.cpp +++ b/libraries/animation/src/AnimClip.cpp @@ -156,7 +156,10 @@ void AnimClip::copyFromNetworkAnim() { } AnimPose trans; - if (usePreAndPostPoseFromAnim) { + if (_skeleton->getJointName(skeletonJoint) == "RightEye" || _skeleton->getJointName(skeletonJoint) == "LeftEye") { + // preserve model eye translation + trans = AnimPose(glm::vec3(1.0f), glm::quat(), relDefaultPose.trans); + } else if (usePreAndPostPoseFromAnim) { trans = AnimPose(glm::vec3(1.0f), glm::quat(), boneLengthScale * (fbxAnimTrans + (fbxAnimTrans - fbxZeroTrans))); } else { trans = AnimPose(glm::vec3(1.0f), glm::quat(), relDefaultPose.trans + boneLengthScale * (fbxAnimTrans - fbxZeroTrans));