Reputation: 4253
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
Upvotes: 5
Views: 9715
Reputation: 164
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)."
Upvotes: 0
Reputation: 11
The Body Transform (Pose) is the mass center of the character.
The Root Transform is a projection on the Y plane of the Body Transform (Pose) and is computed at runtime.
If you want to transfer the body transform to the gameobject first you have to transfer it to the root transform because that is the one that is applied to the gameobject transform. to transfer, for example, the XZ motion of the body transform to the root transform, you need to uncheck bake into pose option.
Upvotes: 1
Reputation: 4253
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.
Upvotes: 11