mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:58:59 +02:00
Add hand roll, pitch, and yaw
This commit is contained in:
parent
3ddd5854cd
commit
1527c40e1d
1 changed files with 12 additions and 2 deletions
|
@ -236,8 +236,18 @@ var leapHands = (function () {
|
||||||
handRoll = handRoll + PI / 2.0;
|
handRoll = handRoll + PI / 2.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hand position ...
|
// Hand position and orientation ...
|
||||||
MyAvatar.setJointModelPositionAndOrientation(hands[h].jointName, handOffset);
|
if (h === 0) {
|
||||||
|
MyAvatar.setJointModelPositionAndOrientation(hands[h].jointName, handOffset, Quat.fromPitchYawRollRadians(
|
||||||
|
handPitch,
|
||||||
|
-PI / 2.0 - handYaw,
|
||||||
|
handRoll), true);
|
||||||
|
} else {
|
||||||
|
MyAvatar.setJointModelPositionAndOrientation(hands[h].jointName, handOffset, Quat.fromPitchYawRollRadians(
|
||||||
|
handPitch,
|
||||||
|
PI / 2.0 - handYaw,
|
||||||
|
handRoll), true);
|
||||||
|
}
|
||||||
|
|
||||||
// Finger joints ...
|
// Finger joints ...
|
||||||
// TODO: 2.0 * scale factors should not be necessary; Leap Motion controller code needs investigating.
|
// TODO: 2.0 * scale factors should not be necessary; Leap Motion controller code needs investigating.
|
||||||
|
|
Loading…
Reference in a new issue