Search Unity

Parent Contraints evalutation/execution order and IK.

Discussion in 'Animation' started by Kesh, Jan 31, 2020.

  1. Kesh

    Kesh

    Joined:
    Jan 13, 2014
    Posts:
    21
    Hello,

    Is there any way to adjust the evaluation or execution order of Parent Constraints? I have a character that modifies IK through scripting after the Update loop, and Parent Constraints ignores the updated transforms after IK in Unity 2019+. It seems to only evaluate the Animator stream. In 2018 LTS the order is correct and applies Parent Constraints after my IK. Is there any way to correct this in 2019.3 ?
     
  2. Kesh

    Kesh

    Joined:
    Jan 13, 2014
    Posts:
    21
    bump
     
  3. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    Chances are you are referring to the following issue we addressed a while ago:
    https://issuetracker.unity3d.com/is...-function-does-not-yield-the-correct-position

    The issue was that constraints were applied after the LateUpdate callback and thus there was no way to run game logic to get the end result of animation (animation + constraints).

    If you want to modify the animator IK before the constraints have been applied, you can use the OnAnimatorIK callback instead.

    You can refer to the following for a detailed explanation of the execution order in Unity:
    https://docs.unity3d.com/Manual/ExecutionOrder.html