mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
Fix for Hydra scaling
This PR fixes the hydra (and probably other hand controllers) while scaling. Testing notes: - Enable your hydra's - Grow your avatar (x5 or x10) (With the `+` key) - Spreading your arms in a T-pose should work without any scaling issues - Reset your scale using the `=` key
This commit is contained in:
parent
ef380ca38c
commit
8f6e7018bd
1 changed files with 1 additions and 1 deletions
|
@ -5007,7 +5007,7 @@ void Application::setPalmData(Hand* hand, const controller::Pose& pose, float de
|
|||
palm.setActive(pose.isValid());
|
||||
|
||||
// transform from sensor space, to world space, to avatar model space.
|
||||
glm::mat4 poseMat = createMatFromQuatAndPos(pose.getRotation(), pose.getTranslation());
|
||||
glm::mat4 poseMat = createMatFromQuatAndPos(pose.getRotation(), pose.getTranslation() * myAvatar->getScale());
|
||||
glm::mat4 sensorToWorldMat = myAvatar->getSensorToWorldMatrix();
|
||||
glm::mat4 modelMat = createMatFromQuatAndPos(myAvatar->getOrientation(), myAvatar->getPosition());
|
||||
glm::mat4 objectPose = glm::inverse(modelMat) * sensorToWorldMat * poseMat;
|
||||
|
|
Loading…
Reference in a new issue