- Home /
Mecanim root motion
Hello there, I've read all the docs that I was able to find about root motion in Unity. But still I can't understand a lot of basic concepts. Any explanation is highly appreciated. I used this article while trying to understand: link text
What is Body Transform? Does it have any concern with actual bones of the rig (for example, the root bone)? Or is it calculated somehow on the run? What does it usually used for?
Here is the abstarct from the article: "The Root Transform is a projection on the Y plane of the Body Transform and is computed at runtime." But I don't know what is "Y plane of the Body Transform".
I can't understand how these objects work together and what are they for? Thanks in advance.
Answer by TonyLi · May 15, 2013 at 05:32 PM
The body transform is computed at import time. It's stored in the imported animation clip (.anim file). This tells Unity how far to move the avatar at each frame of animation. For example, as the avatar walks forward, this will contain a curve that translates on the Z-axis (i.e., forward). Without root motion, the avatar would play the walking animation in-place.
The root transform is the runtime expression of the body transform. The "Y plane" is the floor. As the animation plays, the root transform is how far the avatar should move relative to the current position on the floor.
Thank you very much! The only thing I still don't get is does Body Transform correspond to some definite bone of the rig?
I think it depends on Bake into Pose. If Bake into Pose is unchecked, it will change the transform of the topmost bone. (If my understanding turns out to be incorrect, please correct me! I'm using Bake into Pose because my $$anonymous$$ixamo animations work better with the camera that way. The camera follows the avatar's transform, and this prevents it from bouncing up and down with slight variations in Y.)