What's root motion and how it works?
I'm reading Unity Animation cookbook book. And I'm stuck at "Root Motion" topic. All I can understand now is Root motion allows the GameObject to move with the motion clip without coding. and it depends on the root node.
But I can't imagine/understand how ? or what're that related properties like "Bake to pose" .. what's the pose..? I searched the web to find anyone talking about it.. but no helpful tutorials there! I tried to read from unity docs about the topic but it made it worse.. https://docs.unity3d.com/Manual/RootMotion.html
Please help me with example/link/replay
Answer by dotWasim · Sep 04, 2016 at 02:09 AM
After spending more time searching/watching videos/ reading from other books to understand everything. I'll put my answer here for anyone face same difficulties understanding this topic
Treadmill vs root motion: There are two types of animation, treadmill and root motion. Treadmill means that the animation stays at the origin and we use code to move that asset around. Root motion means the motion is built right into the animation and it's the animation that determines how far something moves rather than code.
Then you have to watch this video to get an idea about how it looks in Blender and later in Unity when you import the character & animation https://www.youtube.com/watch?v=d5z9dEnE4DE
Root Transform Rotation: This option captures the rotation of the root node and applies it to the whole game object. You can set it to Bake Into Pose to disable the root motion rotation. With this option selected, the rotation will be treated as a visual effect of the animation and will not be applied to the game object. You should set it to true for every animation that shouldn't rotate the character. You can set the Based Upon option to one of the following options:
Root Transform Position Y: This option captures the vertical movement of the root node and applies it to the whole game object. You can set it to Bake Into Pose to disable the root motion in the Y axis. With this option selected, the Y axis motion will be treated as a visual effect of the animation and will not be applied to the game object. You should set it to true for every “on ground” animation (unless it's a jump).
Root Transform Position XZ : This option captures the horizontal (XZ) movement of the root node and applies it to the whole game object. You can set it to Bake Into Pose to disable the root motion in the X and Z axis. With this option selected, horizontal motion will be treated as a visual effect of the animation and will not be applied to the game object. You should set it to true for all stationary animations (such as Idle).
Good animations may combine both traditional(treadmill) and root motion ways.
I'm glad I'm not the only one whose really confused by all the options and the fact there's two root motion settings.
I've created a 90 degree left turn animation for my dog. It's really nice, in blender, the dog actually ends up pointing 90 degrees to the left. I also rotated my root motion bone 90 degrees to the left hoping that would help unity know what to do with the character.
The trouble is - when I put this into Unity, the root motion amplifies the animation, and my dog animates 180 degrees then snaps back to the root motion. Have you come across this problem or solved it yourself? I could be doing this all wrong.
It'd be really hard for me to animate the turn 'in place', but maybe that's my only option.
This should really be a sticky or something! Thanks, was extremly usefull to understand it. Happy coding ^^
Answer by DSivtsov · Nov 02, 2021 at 08:06 PM
@dotWasim All right except "You should set it to true for every “on ground” animation (unless it's a jump)."
More correctly will be: "You should set it to True for every animation, where you will move Character GameObject by Axis Y by code (Unity Script), also are including the Jumping animation. If you will not move the GameObject of the Character along the Y-axis (by code), but want to implement "Jump" as the movement of bones (parts of the character's skeleton) from the jump animation, if it is present in the animation that was imported, you must set it to False. Many popular the Jumping "In-place" animations doesn't include the movement of bones, which will track the full bones movement at real Character Jump (say simple - in these animations the Root Node not up on demanding height)."
Your answer
Follow this Question
Related Questions
Rootmotion fall 0 Answers
root motion problem. direction parameter set to 90 on start 0 Answers
Moving player with animation 1 Answer
No generate root motion curves button in unity 5.3.5 2 Answers
Root Motion causing door to shift left 0 Answers