Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Timeline Root Motion is different than Animator/Mechanim

Discussion in 'Timeline' started by AquaGhost, Aug 5, 2018.

  1. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    We were noticing some sliding on some walk animations, and from investigating that, we noticed that if you play a walking animation in timeline, and put a copy of that character next to itself, and play the same animation just using an Animator Controller....the one with the animator controller is accurate, and the one on timeline seems to walk about 20% farther, and slides a bit because it's going too fast.

    Is this a timeline bug? I searched and couldnt find this exact issue. The most similar was the bug where a scaled character's root motion is not affected by scale.
     
    Last edited: Aug 5, 2018
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Timeline doesn't apply scale to root motion, either local scale or humanoid scale (my guess at the difference here), which could be what you are seeing. 2018.3 has a fix for this.
     
  3. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    @seant_unity we've seen that for scaled characters, but these guys are both scaled at 1. And the character root is 1, and the hips are 1. Though the symptoms seem similar. Is there anything else that could cause this. We have a deadline this week, so we can't really wait for a release!
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Is it a humanoid or generic character? If it's humanoid, you can try using Generic - that will at least help narrow the cause down.
     
  5. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    @seant_unity it still moves the wrong distance if we switch it to generic.
     
  6. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    Can you sent it to us ( via bug report, and paste the bug number here). we will take a look.
     
  7. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
  8. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    @AquaGhost - I downloaded the project attached to the bug and built it on two different players in 2018.3 and got the same result everywhere. That bug was related to recorded animation clips and is fixed (as written) in 2017.x, unless I'm missing something.

    If the behaviour on a different test case is the same on 2018.3 as before, that's actually a good thing. We went to great lengths to make sure we wouldn't break existing projects, as we are aware some users have successfully worked around issues with editor / player differences.

    For any other cases try changing the track offset (found in the inspector for AnimationTracks) to either Apply Transform Offset (position & rotation will start in absolute coordinates), or Apply Scene Offsets (position & rotation start relative to the current position).

    For clarity, upgraded animation tracks will be set to Auto (deprecated). New animation tracks are set to Apply Transform Offsets. Which is why the behaviour doesn't change automatically.

    If that still doesn't fix the issue, then open a new issue with a new test case and we will look at it asap.
     
  9. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    @seant_unity I want to make sure this isnt user error before we open a new bug. The issue isnt that we are getting different offsets, it's that the root motion speed is different.
    In my example (vid above) the timeline-animated character is not moving at the same speed as the one animated with Animator.
    Changing offsets doesn't seem to affect his bug.
    I can send you this project if you want to take a look.
     
  10. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Ok, that makes a bit more sense then.

    Pre-2018.3, in most cases the scale (local scale and humanoid) would not be applied when animated in timeline. That meant the same animation would not apply the same in timeline as it would an animator controller.

    In 2018.3, if the track offsets are not Auto, then the 'Apply Root Motion' flag on the animator is respected by Timeline and local scale and humanoid scale will be applied if it's checked.

    If it's something other than that, feel free to send me the project.
     
  11. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    @seant_unity Thanks. Ok I had to look around but I found what I was looking for.
    In case anyone else is looking:
    The 2018.3 options I needed to change are on the track options (left side of timeline). For a second I was looking at the inspector for the actual clip tracks in there.. If I get it changed to any of the new 2018.3 options, it fixes that offset speed and they match speed. So no new bug here!
     
    Vadim-Silvestrov and seant_unity like this.