Extra joints on soft entities keep their local transform

This commit is contained in:
luiscuenca 2018-10-24 12:54:09 -07:00
parent 04d251c321
commit b8cd5045c7

View file

@ -488,8 +488,8 @@ void Avatar::relayJointDataToChildren() {
glm::quat jointRotation;
glm::vec3 jointTranslation;
if (avatarJointIndex < 0) {
jointRotation = modelEntity->getAbsoluteJointRotationInObjectFrame(jointIndex);
jointTranslation = modelEntity->getAbsoluteJointTranslationInObjectFrame(jointIndex);
jointRotation = modelEntity->getLocalJointRotation(jointIndex);
jointTranslation = modelEntity->getLocalJointTranslation(jointIndex);
map.push_back(-1);
} else {
int jointIndex = getJointIndex(jointName);
@ -512,8 +512,8 @@ void Avatar::relayJointDataToChildren() {
jointRotation = getJointRotation(avatarJointIndex);
jointTranslation = getJointTranslation(avatarJointIndex);
} else {
jointRotation = modelEntity->getAbsoluteJointRotationInObjectFrame(jointIndex);
jointTranslation = modelEntity->getAbsoluteJointTranslationInObjectFrame(jointIndex);
jointRotation = modelEntity->getLocalJointRotation(jointIndex);
jointTranslation = modelEntity->getLocalJointTranslation(jointIndex);
}
modelEntity->setLocalJointRotation(jointIndex, jointRotation);
modelEntity->setLocalJointTranslation(jointIndex, jointTranslation);