mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:41:02 +02:00
Merge pull request #2990 from AndrewMeadows/bug-fix
fix for broken windows build with PrioVR libs
This commit is contained in:
commit
981d0eb36e
1 changed files with 4 additions and 3 deletions
|
@ -76,20 +76,21 @@ static void setPalm(float deltaTime, int index) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: this math is done in the worl-frame with unecessary complexity.
|
||||||
|
// TODO: transfom this to stay in the model-frame.
|
||||||
glm::vec3 position;
|
glm::vec3 position;
|
||||||
glm::quat rotation;
|
glm::quat rotation;
|
||||||
|
|
||||||
SkeletonModel* skeletonModel = &Application::getInstance()->getAvatar()->getSkeletonModel();
|
SkeletonModel* skeletonModel = &Application::getInstance()->getAvatar()->getSkeletonModel();
|
||||||
int jointIndex;
|
int jointIndex;
|
||||||
glm::quat inverseRotation = glm::inverse(Application::getInstance()->getAvatar()->getOrientation());
|
glm::quat inverseRotation = glm::inverse(Application::getInstance()->getAvatar()->getOrientation());
|
||||||
if (index == LEFT_HAND_INDEX) {
|
if (index == LEFT_HAND_INDEX) {
|
||||||
jointIndex = skeletonModel->getLeftHandJointIndex();
|
jointIndex = skeletonModel->getLeftHandJointIndex();
|
||||||
skeletonModel->getJointRotation(jointIndex, rotation, true);
|
skeletonModel->getJointRotationInWorldFrame(jointIndex, rotation);
|
||||||
rotation = inverseRotation * rotation * glm::quat(glm::vec3(0.0f, PI_OVER_TWO, 0.0f));
|
rotation = inverseRotation * rotation * glm::quat(glm::vec3(0.0f, PI_OVER_TWO, 0.0f));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
jointIndex = skeletonModel->getRightHandJointIndex();
|
jointIndex = skeletonModel->getRightHandJointIndex();
|
||||||
skeletonModel->getJointRotation(jointIndex, rotation, true);
|
skeletonModel->getJointRotationInWorldFrame(jointIndex, rotation);
|
||||||
rotation = inverseRotation * rotation * glm::quat(glm::vec3(0.0f, -PI_OVER_TWO, 0.0f));
|
rotation = inverseRotation * rotation * glm::quat(glm::vec3(0.0f, -PI_OVER_TWO, 0.0f));
|
||||||
}
|
}
|
||||||
skeletonModel->getJointPositionInWorldFrame(jointIndex, position);
|
skeletonModel->getJointPositionInWorldFrame(jointIndex, position);
|
||||||
|
|
Loading…
Reference in a new issue