Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2015
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # Get joint positions of right arm.
  2. shoulder = skeleton.joints[8]
  3. elbow = skeleton.joints[9]
  4. wrist = skeleton.joints[10]
  5. elbow_to_shoulder = norm(shoulder.pos - elbow.pos)
  6. elbow_to_wrist = norm(wrist.pos - elbow.pos)
  7. angle_radians = acos(dot(elbow_to_shoulder, elbow_to_wrist))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement