is called by the Animator component immediately before it updates its internal IK system. This callback can be used to set the positions of the IK goals and their respective weights.
OnAnimatorIK
is only called if the following requirements are met: - The Animator component must reference an Avatar configured as Humanoid. Generic or Legacy avatars do not support IK. - The Animator Controller layer you want to process IK on must have the IK Pass option enabled. - The Animator component must be enabled and playing an animation on the GameObject. - The script containing
OnAnimatorIK
must be attached to the GameObject with the Animator component. Common uses include: - Setting the position and rotation of IK goals, such as hands and feet, to interact with objects or reach targets in the environment. - Blending between animation-driven and IK-driven motion by adjusting IK weights. - Creating procedural animations, such as looking at a target or reaching for an object. Additional Resources: AnimatorController, Avatar, Animator.