Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hey, I have been looking into root motion for a little bit. So far I have come across mixed reactions from people. Pros and cons left and right. I wanna be sure if it really makes things that much easier. Cuz some people tell me that leaving majority of the movement and combat to animations alone is a bad idea because it will give you less control as a dev. Tell me something, do souls-like games use root motion often? Is it really that much easier or better to set up compared to the good old fashioned code motion? You seemed rather convinced in your comment where you said that it makes life a "million times easier". Just asking for another sermon, pastor. <3

It depends entirely on the type of game you want to make, and how accurate you want the movements to line up with the ground, or be in sync with other actions. But for the most part, root motion only makes life eaiser for almost all attacks and movement code, and for the small percent where you want full control..  just code as you would as if it weren't root motion. At any time you can forcfully move your character somewhere anytime you want. if you choose to include the root motion information, then you just fetch it from the animation tree, but if you don't want it, then just don't do that, and code it as if it weren't root motion.

For a soulslike, you 100% want to have root motion, it'll look a hell of a lot better and make adding most actions a lot easier, and for the actions where you don't want root motion, you just code it like a regular dev. Imagine a big ax swing where the player takes 2 steps forward to swing the big thing. It'll look MUCH better to animate that with a root bone, controlling how far the player moves with each swing during the animation. Blender is easier to animate that with, no doubt. But imagine trying to do that in code. Telling him to wait a half second, then move forward .25 a meter, then wait, for the next step, and another .36 of a meter, and then another .15m to straight out his feet again... That is hell (and what the non-root version uses... and it's like honestly double the code)!

So for souls-likes, yes, root motion is better. Period. I'm making a Metal Gear style game now, and using root motion is a million times easiser there as well. But if I were to do a RTS, starcraft, age of empires, etc etc style point and click. It'd be easier and preferable to ignore root motion since i'll be moving enemies around on a grid... but if i didn't have a grid system... i may even still there use root motion so their feet match perfectly their speed as they walk.

For me, swapping to root motion solved most of my movement code woes. Game dev got a lot easier after that point. I don't use root motion for rotation, i prefer to control that myself based off camera, and for vertical motion like jumping etc, i also leave it out. Easier to do that in pure code or based off math rather than an animation. But for regularly directional movement, root motion is a massive massive time saver, and headache reliever.

Do you have specific questions?

(6 edits)

I completely understood everything you just said. Thank you so much. As for specific questions, yes I do have some if you could answer.

1. I don't want to learn animating from scratch, as I like to focus on environment and level design (I love those reconnecting levels in souls-like games). I would rather my animations are straight from mixamo. Just some simple stuff like walking, running, rolling, blocking, climbing, a few different attacks, etc. If I use your RiGodotify addon to rig my custom character, will importing it to mixamo for animating it remove the root bone or mess up things in any way? As far as I know, Mixamo animations dont have a dedicated root bone as it has hips set as the base of the skeleton.

2. If I can't use Mixamo to animate rigodotify's armatures, what way do you recommend someone like me to get those animations for my character.

3. Also, I have root boned my character in blender using the mixamo-root addon and it seems to work in godot fine. But the roll animation causes the player to roll high above the ground. I asked around and found out that in root animations, the root should be treated as the floor. My head's spinning with this info. I compared my root-boned character with your template character, and apparently the root bone in your character literally never moves from the origin point during spawn or roll animations, it just slides forward or backward during running motions and during rolls. Mine seems to move all over the place during animations. Ugh.

EDIT: Hmm, I just got root bones to work properly with finepointcgi's version of the addon. Now root bones slide around only when they should, as they should. Honestly, there is very few tutorials on this kind of stuff, compared to how much there is for Unreal or Unity. I was surprised by that. But I am glad I gave it a shot. Now I just gotta understand the new method of coding the actual movement in root motion. Cuz the good old velocity.x/z code motion is not the way. I will look at your template again and restudy it, though I'd still like your input on my points above.

Thank you very much for your help, friend. Let me know if I can help you out in return, maybe playtesting your game, helping with design, or just a fresh pair of eyes to look at it to point out any issues that you might overlook as that happens when an artist looks at his painting for so long that he doesnt see flaws in it. I think it is called "perceptual adaptation" or "familiarity blindness".

(+1)

So, the answer to most of your question are kind of linked to each other, even though you made it 3 different questions.

So your goal essentially is to be able to share animations and be able to tweak animations, while also doing as little full animating as possible. You want to mix and match across lots of places, and use root motion.

Cool cool. So, with Godot's retargeting, you can mix and match animations from Mixamo, from Rigodotify, from Stinty, from really anywhere that uses a standard skeleton that you can map into Godot. You can bring in as many animations as you like, save them into libraries, and share them across all your models. So whether to use Rigodotify, Mixamo, or some other skeleton as your base, depends on your needs.

If you just want to reuse animations, just rig a model in Mixamo, map it into Godot. You're done.

If you want create your own animations and have more control. Use Rigodotify for convenient control Rig, make the animations in there, you can always add Mixamo animations to it as libraries later in Godot. If you want some premade libraries, i have a few hundred animatins on my github i give away, some aren't great, but still, it's a massive free library so, have at it: https://github.com/catprisbrey/Godot4-OpenAnimationLibraries

Root bone should be on the floor, yes. And it should animate any velocity movement you want in your game. So forward and backward for walking, left and right for strafing. Etc etc. If a mixamo one is flying all over, it's probably thinking the hips are the root or something, and that's not what you want. Root is generally pretty steady. Some mixamo animations i believe are setup for root, they'll have a checkbox "in place" or not, and you want to have it NOT be in place, so that root drives it forward.

If you need videos on retargeting, and using libarries, my youtube channel is full of them. You'll probably want these ones relating to animation here:
https://youtube.com/playlist?list=PL35yqmsJzxjvuYNgoxrxpOFxu5ZzwhbZ5&si=4WrdbQAo...


I cover a lot on animation retargeting, using libaries, making your own, etc. Hope this answers your questions, and gives you places to find answers.

Thank you very much for all this, it was very helpful. I will certainly look into the links you provided. I understand things a lot more clearly now. Thanks again.

Deleted 7 days ago
(2 edits)

Hey! I'm sorry to bother you again, but I have a small query. Using Jolt physics with your template completely breaks the is_on_floor for my custom player model some reason. If I use Jolt in your template, the player keeps falling/landing/falling/landing again and again, switching between fall animation and idle/landing animation. This happens non-stop. I dont know what it is but I thought I should ask you. At first I thought it was your template, but then I tried out using Jolt in an unchanged default version of your template and everything worked fine. 

But if I use my custom character, the issue is back. I checked my custom-character's root bone and compared it to yours in all the different animations, and there doesn't seem to be anything wrong with it. It moves exactly like yours and in the right place. The collision shape is an exact replica as well. This causes some other issues as well, like, whenever I try to roll I cant because the game thinks I am !is_on_floor(). I did print(is_on_floor()) in the process function and got 

true

false

true

false... and so on repeatingly.

Ugh why oh why, I don't have the right, oh I don't have the right.
<3! 

EDIT: On further investigation, it seems that Jolt isn't to blame. This happens when I use my own animations. But not when I use ones from your library. Strange. I will continue to look into it and report back in case it is important for you to know, otherwise it is most likely my own mess up.