- Home /
How to loop root motion in timeline?
If you loop an animationclip with rootmotion in the timeline it just snaps back to the start position every time it loops. Is there any solution to make the rootmotion relative so the character continues walking forward instead of being reset?.
Answer by thierry_unity · Oct 12, 2017 at 02:38 PM
when you extend the clip, does it say loop or Hold? if it says loop it might be an issue, you could open a bug for us. if it says hold , make sure to enable the loop time in the animation itself.
I tried to upload a gif but I cant get it small enough: https://drive.google.com/open?id=0B65_BPe$$anonymous$$Qx4rWUthUDlPdWVLY1E
The loop flag in the animationclip is set. It also says L1, L2,... in the timeline. Somehow the root even keeps moving while the other bone positions are reset.
Seem like a but to me, please open a bug or expose your issue on the forum in the timeline section, we will try to see what is happening there.
Answer by thierry_unity · Oct 11, 2017 at 02:55 PM
Hi, you can extend the walk cycle clip to make it loop. Make sure to have enabled the loop parameter in the animation.
Thanks for your reply. I did just that but in my case the character snaps back to the starting point after each Loop. $$anonymous$$aybe there is a setting anywhere that I overlooked?
Answer by Michael_Berna · Nov 14, 2020 at 06:04 AM
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.
Your answer
Follow this Question
Related Questions
How to handle Scripted root motion with timeline animation track? 0 Answers
Animate mode does not contain definition for GetCurveBindings 2 Answers
How to animate an instantiated object in the timeline/director 2 Answers
Why does the root motion animation make the prefab move in the opposite direction? 0 Answers
Timeline and AnimationClip problem -1 Answers