Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

When walking animation loops in timeline, it resets the player´s position back to the start

Discussion in 'Timeline' started by sofia_sbr, Jul 16, 2020.

  1. sofia_sbr

    sofia_sbr

    Joined:
    Mar 30, 2020
    Posts:
    2
    Hey everyone,

    I´m currently working with timeline. The scene begins with an "idle" animation and then the player transitions to the "walk" animation.

    I want him to walk for a while and thus set the animation setting to "loop". But everytime the animation clip finishes and then loops, it resets the player´s position too (as in, starts back from where he came from, instead of continuing to walk).

    Here´s a video of how it looks like:


    Also added a screenshot of the animations setting.


    Does anybody know what I´m doing wrong? I want the animation to loop, without the players transform position being reset everytime.
     

    Attached Files:

  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    What are your settings under the Motion drop down? It doesn't appear to be using the correct node to animate the root of the object.
     
  3. quickytools

    quickytools

    Joined:
    Aug 26, 2019
    Posts:
    19
    I'm able to get continuous animation by unchecking Bake Into Pose under Root Transform Position(XZ) of the animation clip. Screen Shot 2020-07-22 at 12.36.33 PM.png
     
  4. Michael_Berna

    Michael_Berna

    Joined:
    Jul 5, 2019
    Posts:
    39

    I had the same issue when using root motion in timeline. My root node position was being transformed in the animation keyframes, but when previewing the animation, the circle underneath the avatar wouldn't move with the character as compared to a working one where the circle would move with the character. What fixed it is on the animation that would reset position after each loop, I went to the animation window and used curves to key "Animator.motion T.z" (won't key with dopesheet for some reason) . Now, it loops properly and the circle travels with the character.
     
    vm318ji likes this.