mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 22:30:42 +02:00
AnimClip: consistent application of translations
Apply animation translation the same way regardless of state of usePreAndPostPoseFromAnimation.
This commit is contained in:
parent
3b062b7a31
commit
69d833a6c0
1 changed files with 1 additions and 9 deletions
|
@ -155,15 +155,7 @@ void AnimClip::copyFromNetworkAnim() {
|
|||
boneLengthScale = glm::length(relDefaultPose.trans) / glm::length(fbxZeroTrans);
|
||||
}
|
||||
|
||||
AnimPose trans;
|
||||
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));
|
||||
}
|
||||
AnimPose trans = AnimPose(glm::vec3(1.0f), glm::quat(), relDefaultPose.trans + boneLengthScale * (fbxAnimTrans - fbxZeroTrans));
|
||||
|
||||
_anim[frame][skeletonJoint] = trans * preRot * rot * postRot;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue