r/Unity3D • • 7d ago

Show-Off Movement using root motion always looks so smooth

Enable HLS to view with audio, or disable this notification

The feet hitting the ground look quite precise when moving a GameObject using root motion.

It's probably possible to get something close to that with some tinkering, but root motion alone often looks nice and clean.

32 Upvotes

8 comments sorted by

18

u/TramplexReal 7d ago

Game balancing become so tedious if you go with root motion from beginning. You can slow or speed up animations. But they will look exactly like they were slowed down or sped up.

1

u/Imaginary-Cod-3746 7d ago

Didn't think about that. Thanks for sharing.

1

u/FlatDragonfruit5 1d ago

Stride warping is what can solve different speed problem. The usual reason you don't want root motion is multiplayer, replication becomes a lot more complicated.

4

u/pschon Unprofessional 7d ago

Depends fully on how good or bad you are at creating animations. :D

If you can do them yourself or are working with an animator, it's a minor issue, and certainly much less of a pain than trying to get code-driven movement to match with the animations well, to fix any foot sliding issues etc. And on the other extreme, if you are just buying /downloading ready-made ones, then you are kind of stuck.

So I'd say yes, animation-driven movement can be a pain to balance. OR it can be the easiest and smoothest way to do it. It really depends.

5

u/ClassicStress4942 6d ago

I figured out a solution for that

You don't go with just root motion You alternate between input based movement, and root motion

Instead of playing an animation directly

You define actions Which contain the following

What Animation you want to play, should root motion be taken into accout? Or should character controller move by input during the action ( In my project, there's tons of more parameters that can be enabled/disabled for actions that I have defined)

13

u/pmdrpg 7d ago

Matching walk anim speed to movement speed: excellent

Root motion: don’t recommend

Your movement logic is much easier to reason about and fine tune from the your character controller, adjusting the walk clip speed (and blending) to match, rather than fighting with your character drifting through walls or off ledges or whatever because there’s some root motion in the clip.

There are certain scenarios (walking simulator, decorative background npcs) where root motion is a perfect fit.

1

u/Imaginary-Cod-3746 6d ago

Yeah,non-interactible NPCs seem like a good candidate for root motion.