mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Move avatar not joint
This commit is contained in:
parent
40fdc4ea41
commit
9ce10742ec
1 changed files with 2 additions and 8 deletions
|
@ -2487,14 +2487,8 @@ bool MyAvatar::pinJoint(int index, const glm::vec3& position, const glm::quat& o
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto jointTranslation = getAbsoluteJointTranslationInObjectFrame(index);
|
setPosition(position);
|
||||||
auto jointRotation = getAbsoluteJointRotationInObjectFrame(index);
|
setOrientation(orientation);
|
||||||
|
|
||||||
auto targetOrientation = orientation * glm::conjugate(glm::normalize(jointRotation));
|
|
||||||
auto targetPosition = position - orientation * jointTranslation;
|
|
||||||
|
|
||||||
setPosition(targetPosition);
|
|
||||||
setOrientation(targetOrientation);
|
|
||||||
|
|
||||||
_rig->setMaxHipsOffsetLength(0.05f);
|
_rig->setMaxHipsOffsetLength(0.05f);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue