I have recently been exploring Unity's inverse kinematics, to further polish the interaction between our rigged avatars and props.
I have made a sample project, using PuppetMaster's basic humanoid for the model, rig, and idle animation, but without Final IK; meaning this is Unity's inverse kinematics. Inside our
OnAnimatorIK method, we set the right elbow's
SetIKHintPositionWeight like we did with the hand IK:
animator.SetIKHintPosition(avatarIKHint, hintPosition); animator.SetIKHintPositionWeight(avatarIKHint, hintBlendValue); animator.SetIKPosition(sourceIKGoal, targetPosition); animator.SetIKPositionWeight(sourceIKGoal, blendValue);
You can see the left and right hand correctly move to where we set it. However, it seems like the right elbow is ignoring the hint position entirely. You can see the white debug line connecting the elbow to the hint position in the picture above.
It seems like the elbow ONLY bends if it absolutely must for the hand to reach the target position, regardless of where the hint is set, and the weight value given.
I have fiddled with this on and off for days and still haven't found a solution. Others have asked the same question here and on other sites, but no one has posted an answer.