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:
Eric Johnston 2013-07-16 17:02:40 -07:00
parent f6619c6d05
commit cf38a0e837

View file

@ -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