r/Unity3D • u/GameDevExperiments • 9d ago
Show-Off We rebuilt our Locomotion System from scratch using Pose Matching. What do you think?
It's a root motion-based controller with start, stop, and turn actions that smoothly blend into walk and run cycles using pose matching.
Previously, we used Unity's Animator Controller with normal transitions between actions and locomotion cycles. The problem with this approach is that a transition always starts the new clip from frame 0, and frame 0 often doesn't match the character's current pose. That causes issues like snapping and foot sliding.
With pose matching, instead of starting a new clip from the beginning, we search the new clip for the frame that best matches the character's current pose by comparing foot positions and movement speed and start from that pose.
It's similar to how motion matching works, but we don't match every frame. We only do it during transitions, so the actions and cycles still play as normal clips, and it's not as performance heavy as motion matching. I can go into more technical details if you guys are interested!
We've released this as a free update for all our systems on the Asset Store. Let us know what you think!
30
u/pmdrpg 9d ago
Smoooooth
10
u/Am_Biyori 9d ago
The transitions liok great. Thanks for explaining how you did it.
5
u/shlaifu 3D Artist 9d ago
it looks very smooth - how does it feel to play, because it also looks somewhat sluggish (realistic - but reality is boring and slow)
4
u/pmdrpg 9d ago
How does this work with your feet IK? Or if you add a layer mask on the upper body to control animation on the arms? surely the matches won’t line up?
3
u/mr_E_reborn 9d ago
This is dope
2
u/vespene_jazz 9d ago
results looks really good! You mention putting something on the asset store but dont mention the actual name of the asset tho...
2
u/Redstoneinvente122 Indie 9d ago
Damn. How are you handling performance with all these grass?
2
u/Bushido_Arts 9d ago
This looks pretty good! How’d you get the camera to follow the character in root motion? And without the model looping back to a previous position before the running?
2
u/Sprinkles0 8d ago edited 8d ago
I've been eyeing your third person shooter controller. I thoroughly enjoy level design, but I suck at character controllers and have been trying to force myself to get through learning how the Unity Third Person Controller works. I'm hating how clunky it's looking. You're however looks so smooth and just what I need to actually get going with my little indie project. Adding The pose matching is great! I'm going to look even harder at it now. haha
2
u/-_Champion_- 8d ago
It looks really nice! Did you make the animations yourself?
2
u/SerMojoRISING 5d ago
Looks very nice, interesting explanation too
1
u/nicer-dude 8d ago
Where did you take the animations from?
1
u/Rishabh1Dev 4d ago
Bro. Graphics look insane. Your character animation matches GTA vibe I think. How did you do that, some example like animation clip, 2 to 3 line of movement script where animation is controlled please. I have also built a third person game and listed on steam but don't have that animation system. My games graphic look realistic because that was made on HDRP but I don't have such experience to make that advanced animation system.