mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 15:13:09 +02:00
apply fake eye saccades if eye joints aren't overridden (rather than if HasProceduralEyeFaceMovement is true)
This commit is contained in:
parent
796bfb5d67
commit
1979e1dbc7
2 changed files with 2 additions and 5 deletions
|
@ -337,10 +337,7 @@ void MySkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) {
|
|||
eyeParams.modelTranslation = getTranslation();
|
||||
eyeParams.leftEyeJointIndex = _rig.indexOfJoint("LeftEye");
|
||||
eyeParams.rightEyeJointIndex = _rig.indexOfJoint("RightEye");
|
||||
|
||||
if (_owningAvatar->getHasProceduralEyeFaceMovement()) {
|
||||
_rig.updateFromEyeParameters(eyeParams);
|
||||
}
|
||||
_rig.updateFromEyeParameters(eyeParams);
|
||||
|
||||
updateFingers();
|
||||
}
|
||||
|
|
|
@ -1973,7 +1973,7 @@ void Rig::updateEyeJoint(int index, const glm::vec3& modelTranslation, const glm
|
|||
|
||||
// TODO: does not properly handle avatar scale.
|
||||
|
||||
if (isIndexValid(index)) {
|
||||
if (isIndexValid(index) && !_internalPoseSet._overrideFlags[i]) {
|
||||
const glm::mat4 rigToWorld = createMatFromQuatAndPos(modelRotation, modelTranslation);
|
||||
const glm::mat4 worldToRig = glm::inverse(rigToWorld);
|
||||
const glm::vec3 lookAtVector = glm::normalize(transformPoint(worldToRig, lookAtSpot) - _internalPoseSet._absolutePoses[index].trans());
|
||||
|
|
Loading…
Reference in a new issue