mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:17:02 +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;
|
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)));
|
trans = AnimPose(glm::vec3(1.0f), glm::quat(), boneLengthScale * (fbxAnimTrans + (fbxAnimTrans - fbxZeroTrans)));
|
||||||
} else {
|
} else {
|
||||||
trans = AnimPose(glm::vec3(1.0f), glm::quat(), relDefaultPose.trans + boneLengthScale * (fbxAnimTrans - fbxZeroTrans));
|
trans = AnimPose(glm::vec3(1.0f), glm::quat(), relDefaultPose.trans + boneLengthScale * (fbxAnimTrans - fbxZeroTrans));
|
||||||
|
|
Loading…
Reference in a new issue