- Home /
Benefits of root motion
Hi! I'm not sure if this is the right place to ask, but what are the benefits of using root motion of an animation to drive a character forward? Isn't it nicer to have full control through a script, so that you can change the speed etc at any time? Also, it seems that root motion is not applied when using a generic rig. Is this a known bug? I found another thread about that here: http://forum.unity3d.com/threads/160908-Generic-mecanim-root-motion-problem
I get the rest of Mecanim though. The whole state machine thing to switch between animations is really nice. Is it possible / viable to use Mecanim without using root motion? Can i control my characters movement the normal way, via script and just control the animation clips with Mecanim's state machine?
Thanks in advance. /Alex
You don't need to control movement just because you use $$anonymous$$ecanim, right? Can it not also be used to control in place animations only?
I'm pretty sure you can turn off root motion on an animation...
Yes, I am aware of that, but that was not my question really... I was wondering why I SHOULD use root motion.
Yep, that's why it wasn't an answer :) I was answering this part of your question:
"Can i control my characters movement the normal way, via script and just control the animation clips with $$anonymous$$ecanim's state machine?"
Answer by whydoidoit · Mar 19, 2013 at 04:05 PM
Root motion removes the possibility of foot sliding and allows you to do complex things that would be hard to control the "speed" for.
Imagine that you had blended a right twist animation and a cartwheel animation. It would be very hard to work out how to position that animation for a particular speed (to ensure the hands hit the ground and the body pivoted over them), but root motion just does that for you.
There are certainly times when it's easier to use normal speed control and adjust the animation weight and speed to match, it's horses for courses. Navigating with root motion is harder because you have to work out how to play the animations to get where you want to go...
To clarify my beliefs on this:
User controlled characters - root motion is easy and natural - the user presses a button, you play an animation, the character moves
AI that is simulating player input - root motion is fine, for the above reasons
AI that is hard path following, or for example, is programmatically dodging in a crowd etc. Hard to predict the user input so the easier choice is to make the movement dictated by the system and then apply the animation that is appropriate. In the picture one of my games uses non-collision detection person on person avoidance which would be a nightmare for root motion.
Oh, I see! Thank you for the reply. I think i'll stick to using a generic rig and script the motion myself then, since I will be using very simple animations, and I prefer to have total control over the character via script.
Your answer
![](https://koobas.hobune.stream/wayback/20220613094702im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
setting animation transition times to joystick float values 0 Answers
Animation and joystick Input 1 Answer
Handling input, movement, animation with scripts? 1 Answer
Mecanim Axis Randomize Input Problem 0 Answers
Clear mecanim trigger input? 1 Answer