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

Discussion in 'Timeline' started by marcV2g, Jun 16, 2017.

  1. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    So I could be missing something obvious but timeline animations apply root motion until the next animation resets its position snapping it back and none of the related setting seem to do anything.
     
    Last edited: Jun 16, 2017
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    You can right click on a clip and use the 'match offsets to previous clip' to align root motion between clips.
     
    apostelzhuk likes this.
  3. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    Any chance this option could be in the inspector? The current inspector has options that look like they should do this but I can not figure out.
     
    Menion-Leah and BigBamBigalow like this.
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    For sure! That's a great suggestion.
     
    BigBamBigalow likes this.
  5. Roy-Massaad1

    Roy-Massaad1

    Joined:
    Jun 30, 2015
    Posts:
    16
    ok but right click the clip where exactly ?

    in the assets? on the timeline track?

    i cant yet find it
     
  6. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    On the clips on the track.

    upload_2017-8-29_13-48-36.png
     
  7. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505
    Shouldn't there be like an automatic checkbox that updates the offset each time we make a modification? When trying to do complex animation blends with a character it would much appreciated rather than having to right click each time.
     
  8. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Yes, there definitely should be! It's already on our internal backlog.
     
    Whatever560 likes this.
  9. grahamvr

    grahamvr

    Joined:
    Feb 20, 2017
    Posts:
    14
    Any update on this at all? my horse is doing root motion in the animator but not the timeline editor? with a generic rig.
     
  10. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    No automatic root motion matching, yet, but it's very much on the radar. We have many root motion improvements for 2018.3 coming, hopefully we can squeeze that one in as well.
     
    ModLunar likes this.
  11. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    Should my character have "Apply Root Motion" checked in the Animator?

    I'm having an issue where I line up the animations between clips in Timeline and everything looks good.

    When I Play the scene and the Timeline executes, the Rootmotion animations are not where they should be...so my character is walking about 15 degrees off from where is should be.
     
    Chambers88 and MadeFromPolygons like this.
  12. Kironde-Namusanga

    Kironde-Namusanga

    Joined:
    Dec 11, 2014
    Posts:
    12
    I spent a hole night bitching about how to solve this issue, i wish it were an automatic timeline thing.
     
    THE_ASKII likes this.
  13. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Check out 2018.3. You can choose per track whether to start at a fixed position/orientation (Transform offset), or from the current position/rotation (Scene offset). And it works independently of root motion now.
     
    Whatever560 and VISARD-UA like this.
  14. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    60
    Just to say there is an extra pitfall with Timeline when you animate an object that also call OnAnimatorMove() by script (such as the character controller from the Standard Assets). Replace it with the FixedUpdate() callback and timeline will be able to apply the root motion!
     
  15. patSilva

    patSilva

    Joined:
    Mar 25, 2019
    Posts:
    27
    I am very confused, I am using Timeline that has an animation track with a walking animation clip. But I can't stop the character from moving; there is nothing in any timelines that are moving this character so I presuming it is the animations root motion. I have tried everything in this thread but my animation is still moving the model as it plays the animation.

    How do I get this model stop moving while the walk animation plays? I am using Unity 2020.2.2
     
  16. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505
    You should try disable root motion form the Animator component. It could also be that your animation is moving the character if badly edited?
     
  17. EssencyStudios

    EssencyStudios

    Joined:
    May 18, 2018
    Posts:
    10
    It took me 2 months to find this random post to solve my problem of root motion in timelines ;-;
    I can't believe it was staring at me in the face this whole time.
     
  18. Ranom

    Ranom

    Joined:
    Oct 10, 2012
    Posts:
    49
    I seem to be having this problem too in 2020.2.6f1.

    I've added two clips to a timeline:

    1. The first one plays moving the character through the world
    2. The second one snaps the character back to the original position and then plays the animation.

    Example clip info:

    clip info.PNG

    Is this supposed to be the setting? I'm seeing no difference no matter what value I set it to.

    apply scene offsets.PNG

    Thanks,

    Ranom
     
  19. Ranom

    Ranom

    Joined:
    Oct 10, 2012
    Posts:
    49
    The old suggestion of using "match offsets to previous clip" seems to work
     
  20. alti

    alti

    Joined:
    Jan 8, 2014
    Posts:
    94
    match offsets to previous clip does not work, UNLESS if the clip from your animation pacakage start off using that offset. But you likely have your root set to 0,0,0 for all/most animation clips.

    It (match offsets) doesn't work / solve anything when selected on the clip in timeline, nor in the inspector section. If the animation clip's root motion bone is moved from zero, then the clip that plays next snaps to zero and begins animating (or wherever the clip was set before being imported to unity).


    Turning off root motion doesn't matter.


    Luckily I'm a genius and a necessary golden gem to the unity community and have come up with a solution that will benefit the universe. Ahem:

    METHOD 1
    • Go to the timeline window and right-click the animator > "Add override track"
    • Copy and paste the clip you wish to use the root motion from.
    • upload_2023-6-24_13-55-20.png
    • Ensure post extrapolate is set to "Hold" (or none, and drag the clip out to where you want to maintain the initial animation's root position).
    • upload_2023-6-24_13-56-4.png
    • Use an avatar mask that uses the characters root bone ONLY, on the override track.
    • upload_2023-6-24_13-57-29.png


    "But what about the next animations root motion? What if the next animation is moving?"

    METHOD 2
    • from the top, add an override track.
    • Click the record button on that override track in timeline, and position your character's root position as you would in your original animating package using the root bone (blender, max, maya, whatever).
    • Adding transform details on this override track will override any root motion on the base animation, allowing you blend the animations in a unity timeline, without positional snapping between animations.

    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.
    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.
    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.
    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.
    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.
    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.
    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.
    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.
    Yes, you will need to re-animate your root if you want to control multiple animations that contain root motion.


    If your subsequent animation clip has no root motion (IE: you're transitioning to an idle pose), see Method 1, to use the root motion from the original clip. You're welcome. Unity, do better. Bye.
     
  21. General_Custard

    General_Custard

    Joined:
    Nov 19, 2016
    Posts:
    3
    This method works with keeping the rig in place on subsequent animations, but the character is pinned in place by the hips, almost like it's a rag doll. Where is your root bone on the character?