Measure angle on wrist

maya
mel

#1

Hello,
I’m trying to extract the angle my wrist is bent to drive some SDK joints. However I can’t seem to make it general enough as the angle I’m getting changes depending on the orientation on nodes above the wrist.
This is my current thinking:
Create three locators, one at the wrist, one at the palm of my hand which follows the rotation of the hand and lastly a second one at the palm of my hand which does not follow the rotation of the hand it does follow the lower arm though.
Subtract the position of my wrist locator from the other two locators so I can get vectors that are placed at the origin.
Use the angleBetween node to get the angle between the two resulting vectors.

This does not seem to work. So I would very much like to learn if I could get it working or if there would be a better way of extracting that angle.

Thanks for the help!


#2

That approach should work fine. Make sure your locators are transposed to the same space (or worst case, use their world matrix position), otherwise the translate attributes won’t line up.


#3

Thanks Ed! Yes, I got it working finally.
The biggest problem was finding good placements for the locators so the angleBetween node could get a good reading. When I had both locators around the palm the angle was the same if I had the hand rotated up or down. Moving one of the locators so it worked more like an upVector worked much better, then I got almost the full 180 degrees.