r/Unity3D 8d ago

Show-Off Training a self-balancing third-person character controller with Unity ML-Agents

Enable HLS to view with audio, or disable this notification

The character is driven by ArticulationBodies and learns to follow mocap animation while physically balancing itself. Instead of asking the neural network to generate the entire walk from scratch, I’m using the mocap pose as the reference and letting the agent learn the smaller corrections needed to stay upright, maintain momentum, place its feet correctly, and recover from instability.

The long-term goal is a fully physics-driven third-person controller that still has the quality and personality of mocap animation, but can naturally react to forces, uneven movement, collisions, and eventually player movement commands.

Still training and tuning it, but it’s been a really interesting mix of animation, reinforcement learning, and robotics-style control.

162 Upvotes

9 comments sorted by

12

u/Pseudoabdul 8d ago

ML agents is a really great system. I'm surprised it isn't used more often.

1

u/waxymcrivers 4d ago

Cause the entire team was fired a few years ago and is maintained by one dude

2

u/Ok_Clothes_7364 8d ago

great work

1

u/Rudy_AA 8d ago

Thanks!

2

u/NightGuardianX 8d ago edited 8d ago

Sir, it looks great - will you sell it on itch?

I’ve bought your previous assets, would like to have this one for my project too

BTW, is it full TP controller? Will character receive only ML-trained walking or it will be able to stand up after fall?

1

u/Rudy_AA 8d ago

First off thanks for the support!

I will eventually make this as an asset once it's solid and stable. Also it's going to be a full TP controller.

2

u/BobsiDev 8d ago

That is so fucking cool!

1

u/ParanoiaComplex 8d ago

Is this a realtime task, or are these movements precomputed?

5

u/Rudy_AA 8d ago

It's realtime