mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:56:52 +02:00
fix finger and palm-normal directions for JS
This commit is contained in:
parent
817c4147d6
commit
c61bc190de
1 changed files with 4 additions and 2 deletions
|
@ -114,12 +114,14 @@ float HandData::getBaseScale() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 PalmData::getFingerDirection() const {
|
glm::vec3 PalmData::getFingerDirection() const {
|
||||||
const glm::vec3 LOCAL_FINGER_DIRECTION(0.0f, 0.0f, 1.0f);
|
// finger points along yAxis in hand-frame
|
||||||
|
const glm::vec3 LOCAL_FINGER_DIRECTION(0.0f, 1.0f, 0.0f);
|
||||||
return glm::normalize(_owningHandData->localToWorldDirection(_rawRotation * LOCAL_FINGER_DIRECTION));
|
return glm::normalize(_owningHandData->localToWorldDirection(_rawRotation * LOCAL_FINGER_DIRECTION));
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 PalmData::getNormal() const {
|
glm::vec3 PalmData::getNormal() const {
|
||||||
const glm::vec3 LOCAL_PALM_DIRECTION(0.0f, -1.0f, 0.0f);
|
// palm normal points along zAxis in hand-frame
|
||||||
|
const glm::vec3 LOCAL_PALM_DIRECTION(0.0f, 0.0f, 1.0f);
|
||||||
return glm::normalize(_owningHandData->localToWorldDirection(_rawRotation * LOCAL_PALM_DIRECTION));
|
return glm::normalize(_owningHandData->localToWorldDirection(_rawRotation * LOCAL_PALM_DIRECTION));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue