mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-19 00:57:35 +02:00
AnimClip: special case the translation on the eyes
This commit is contained in:
parent
3cee3cbb5a
commit
3b062b7a31
1 changed files with 4 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue