mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-15 20:39:08 +02:00
Merge pull request #14270 from luiscuenca/softEntitiesLooseJointsFix
Extra joints on soft entities keep their local transform
This commit is contained in:
commit
5c78a463de
1 changed files with 4 additions and 4 deletions
|
@ -498,8 +498,8 @@ void Avatar::relayJointDataToChildren() {
|
||||||
glm::quat jointRotation;
|
glm::quat jointRotation;
|
||||||
glm::vec3 jointTranslation;
|
glm::vec3 jointTranslation;
|
||||||
if (avatarJointIndex < 0) {
|
if (avatarJointIndex < 0) {
|
||||||
jointRotation = modelEntity->getAbsoluteJointRotationInObjectFrame(jointIndex);
|
jointRotation = modelEntity->getLocalJointRotation(jointIndex);
|
||||||
jointTranslation = modelEntity->getAbsoluteJointTranslationInObjectFrame(jointIndex);
|
jointTranslation = modelEntity->getLocalJointTranslation(jointIndex);
|
||||||
map.push_back(-1);
|
map.push_back(-1);
|
||||||
} else {
|
} else {
|
||||||
int jointIndex = getJointIndex(jointName);
|
int jointIndex = getJointIndex(jointName);
|
||||||
|
@ -522,8 +522,8 @@ void Avatar::relayJointDataToChildren() {
|
||||||
jointRotation = getJointRotation(avatarJointIndex);
|
jointRotation = getJointRotation(avatarJointIndex);
|
||||||
jointTranslation = getJointTranslation(avatarJointIndex);
|
jointTranslation = getJointTranslation(avatarJointIndex);
|
||||||
} else {
|
} else {
|
||||||
jointRotation = modelEntity->getAbsoluteJointRotationInObjectFrame(jointIndex);
|
jointRotation = modelEntity->getLocalJointRotation(jointIndex);
|
||||||
jointTranslation = modelEntity->getAbsoluteJointTranslationInObjectFrame(jointIndex);
|
jointTranslation = modelEntity->getLocalJointTranslation(jointIndex);
|
||||||
}
|
}
|
||||||
modelEntity->setLocalJointRotation(jointIndex, jointRotation);
|
modelEntity->setLocalJointRotation(jointIndex, jointRotation);
|
||||||
modelEntity->setLocalJointTranslation(jointIndex, jointTranslation);
|
modelEntity->setLocalJointTranslation(jointIndex, jointTranslation);
|
||||||
|
|
Loading…
Reference in a new issue