Search Unity

Setting Motion Time on Animator State sends Root Motion crazy

Discussion in 'Animation' started by zoooom, Dec 3, 2021.

  1. zoooom

    zoooom

    Joined:
    Feb 8, 2012
    Posts:
    50
    I'm trying to drive a walk cycle animation on a humanoid rig by setting the Motion Time value on the animator state. Unfortunately doing so with Root Motion enabled (either checked on the Animator component or applied via script in OnAnimatorMove) results in the humanoid flying off screen as animator.deltaPosition is huge each frame. Root Motion and setting Motion Time work fine independently using the same assets.

    Just wondering if this is a bug or whether there's another method to achieve this. Currently using Unity 2020.3.20f1.

    Cheers.

    Edit: In further testing even just ticking the parameter checkbox for Motion Time and leaving the parameter on zero results in this behaviour if Root Motion is also enabled.
     
    Last edited: Dec 3, 2021
  2. VeryHotShark

    VeryHotShark

    Joined:
    Mar 11, 2017
    Posts:
    13
    Hi, I have the same problem, did you manage to fix it soemhow?
     
  3. aryansaurav

    aryansaurav

    Joined:
    Oct 25, 2020
    Posts:
    1
    Yup, same issue here! I did check everything.. and couldn't find any issue in my algorithms/setup.

    Looking at the above two posts, I suspect this could very well be a bug and other members could possibly avoid wasting further time on it.

    More precisely, on enabling root motion in animator inspector window and motion time parameter in the animation clip properties at the same time leads to the gameobject rotating and translating at the same time going to infinity in no time.
     
  4. toosterr

    toosterr

    Joined:
    Jul 15, 2022
    Posts:
    4
    anyone fixed that issue. Having same issue