I want to control a servo with the angle between pointable.direction and palm normal.
This doesn't work:
var angleIndex = Math.acos(Leap.vec3.dot(hand.palmNormal, index.direction));
because I get an unsigned angle, which goes from positive to zero when finger and palm normal are parallel, but starts to increase in the positive when the finger gets closer to the palm.
Any suggestion on how to compute the sign?
Is there a better way than using pointable.direction and hand.palmNormal?
I believe that what had been said in older posts on the intrinsic problems of getting the signed angle between vectors doesn't apply to palm and fingers, but I may be wrong...