I’m experimenting with a motion matching system.
To do this, I obtained a character movement animation with root motion.
Unfortunately, the documentation for that animation does not give the exact value of the movement speed.
I would like to set my character’s movement speed to be the same as the movement speed of this animation.
Is there any way to determine the root motion speed of an animation with root motion in Unreal Engine?
There isn’t a term called “root motion speed” because what are you considering to be the anchor point? A model has multiple bones that get transformed during an animation, and these are not in fact what makes up the physical character which the capsule component follows but just virtual representations of what the character’s doing. Normally, when you use the “Get Velocity” node, it returns you the velocity of the root bone. But if there’s a different bone that you want to get the velocity of, you can use that instead.
OH WAIT! I was reading your question over and over, to make sure I understood your question right. I think you want to ask “how to make the speed of the character realistic while playing an animation in which it’s legs move” is that correct? Unfortunately, it’s not as simple as you might think, because there are many aspects to consider while trying to make the movement as accurate as possible. That includes the speed of the animation, the leg length, the consistency etc. You can calculate most of these using math but to be honest just a good observation would suffice. You can adjust it to perfection with just a few attempts! But there’s a dealbreaker that prevents us from reaching the true perfection, which is the consistency. A single step of a human isn’t smooth. Usually we speed up a bit while pulling the other feet forward, so if you look closely you would see something like this: speed up, slow down, speed up… while we’re walking. Because even though our average speed is consistent, the movements that make it up aren’t. This behavior is obviously possible to replicate in a game but it would be a waste of time by today’s standards since absolutely nobody would notice, but would also be an over complication. So I recommend just adjusting the speed of your character during different animations by observing them and setting a believable speed.
I hope I was able to understand your question and give a helpful reply
Thank you, your advice is very helpful.
Yes, the speed of the root motion that I wanted to know seemed to be a pretty inaccurate number.
However, the animator is delivering the character’s walking animation and says, “This animation looks good when the character’s movement component has a maximum walking speed of 200.” This makes things easier, but I was wondering if there was an easy way to find animations that don’t come with such a description when I need to find them on my own. (I’m still a newbie to this engine and thought it might be indicated in a panel somewhere in the engine).
I guess my best bet is to apply that animation to the character and play around with it myself to find the right speed that doesn’t push the foot off the ground.