Hi there! I can’t understand execution order of methods OnAnimatorIK() and LateUpdate(). Does OnAnimatorIK() override the results (I’m doing some custom IK in LateUpdate()) calculated in LateUpdate()? If so, how I can override resulting charachter pose calculated in OnAnimatorIK()?
Thanks in advance.
I ran a quick test. I’m not sure the results hold 100% of the time, but here they are:
On the first update cycle: Update → LateUpdate > OnAnimatorIK
On all subsequent cycles: Update → OnAnimatorIK → LateUpdate
I ran 10 trials of 100 cycles, where each cycle reported the time it ran Update, LateUpdate, and OnAnimatorIK. However, OnAnimatorIK just sets IK targets. I don’t know when it actually computes and applies the IK.
In this thread, the developer suggested that LateUpdate is the right place to put your custom IK code, but didn’t provide many details. If you post the question on the Unity Support forum and an official answer, please let us know!