mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 03:38:28 +02:00
Avatar's arm follows real or simulated Leap glove, if present.
This is a tiny change, and the effect is pretty good. It's only active if there's a Leap device connected and you're using it, or else if you've used the Debug menu item to fake a Leap glove.
This commit is contained in:
parent
f6619c6d05
commit
cf38a0e837
1 changed files with 6 additions and 0 deletions
|
@ -819,6 +819,12 @@ void Avatar::updateHandMovementAndTouching(float deltaTime, bool enableHandMovem
|
|||
} else {
|
||||
_avatarTouch.setHasInteractingOther(false);
|
||||
}
|
||||
|
||||
// If there's a leap-interaction hand visible, use that as the endpoint
|
||||
if (getHand().getHandPositions().size() > 0) {
|
||||
_skeleton.joint[ AVATAR_JOINT_RIGHT_FINGERTIPS ].position =
|
||||
getHand().leapPositionToWorldPosition(getHand().getHandPositions()[0]);
|
||||
}
|
||||
}//if (_isMine)
|
||||
|
||||
//constrain right arm length and re-adjust elbow position as it bends
|
||||
|
|
Loading…
Reference in a new issue