Search Unity

Predict Transform & Rotation values of Rootmotion clips after Blending or Transition.

Discussion in 'Animation' started by shashankgoud, Jul 22, 2019.

  1. shashankgoud

    shashankgoud

    Joined:
    Jul 22, 2019
    Posts:
    2
    Hello,
    When I try to blend or make any transition between 2 rootmotion clips, the transformation of humanoid character changes completely to different direction as Unity tries to blend keys in each frame in the animation with some averaging technique.
    I'm trying to calculate the transform and rotation of the humanoid rootmotion clips after blending and transition in controller. So that I can predict where my character final reaches after going through Transition region.

    Can anyone please suggest some way to predict the blending of animation transformation.

    Thanks.
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    There's no practical way to accurately predict the output of a Blend Tree. Even if you serialize the AnimationClips separately so you can actually access them and calculate the expected weight of each animation, the resulting root motion will not be as predicted. I've explained the issue in more detail here.
     
  3. shashankgoud

    shashankgoud

    Joined:
    Jul 22, 2019
    Posts:
    2
    Thanks. Can you suggest any alternate solution to fix it.
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    The only simple solution I can think of would be to move the object yourself instead of using root motion.

    Otherwise if you use one of Animancer's Animation Mixers to get a predictable output from the blending, you could use Exposed Curves to extract the root motion curves from the animation so that you can sample them freely.