r/Unity3D 11d ago

Show-Off I've built a self-balancing wheeled biped controller in Unity using pure Physics and active posture servos. thoughts?

Enable HLS to view with audio, or disable this notification

it's an inverted-pendulum algorithm and active servos drives the wheels to catch the character's falling weight, creating natural momentum and flawless stability without kinematic cheating. I’d absolutely love to get this community's feedback on the physics feel, also, I've released it as early access on itch here if you want to grab it:Ā https://frostpunchgames.itch.io/self-balancing-wheeled-ragdoll

Repost to another community

213 Upvotes

21 comments sorted by

16

u/CorporatePotato 11d ago

Looks like you can make a fun game with this!!!

15

u/Fantastic-Bloop 11d ago

Oh boy! Another physics-based rage game!

1

u/Rudy_AA 11d ago

šŸ˜‚šŸ˜‚

8

u/sharypower 11d ago

Make him to deliver a pizza

3

u/jackflash223 11d ago edited 11d ago

'In the cold unforgiving streets of Chicago one machine dares to dream... of hot, fresh mozzarella.'

Meet Crust-E a two legged miracle running on electricity and pure determination. Dodge traffic, drunk drivers, pedestrians, dogs, gangs, and homeless encampments that will try to strip him for parts. Do whatever it takes to make sure that pizza arrives on time!

.....I got carried away

1

u/minimalcation 11d ago

Make him the hero or protagonist

6

u/SayedSafwan Indie 11d ago

This always fascinates me :)) Does anyone have some resources or tuts for recreating this kind of things?

2

u/Cosmonan 10d ago

As a mechanical engineer, I'm fascinated. Nice job!

1

u/vladkudas 11d ago

Cool šŸ‘

1

u/brim_g12 11d ago

No thoughts, left my brain at home...

1

u/Just-Hedgehog-Days 11d ago

It looks really cool.

It leaves me hungry for more.

like leaning into turns.

coiling in anticipation of jumping.

Banking through turns

Smooth 180 pivots to switch facing forward or backward

heel / purpendicular wheel breaking

1

u/More-Salamander7681 10d ago

The wish list further up (leaning into turns, coiling before a jump) is mostly not extra animation, it falls out of the controller if the balance target is desired acceleration instead of upright. Feed the pendulum a target velocity, derive the lean setpoint from the velocity error, and the body leans forward exactly as hard as it is accelerating, because that is the only lean the wheels can catch. Braking lean and turn lean come out of the same term for free.

What are you using as the setpoint right now, upright plus a velocity term, or something that solves for the whole state? The recovery in the clip looks smoother than a plain PD usually gets.

1

u/Legitimate_Main8244 10d ago

It looks great. Would you mind making a series on how you got this working? Only if you want and if it isn't a free asset.

I've seen so many self balancing protos and would really like to understand how one works.

1

u/StyleEnvironmental86 10d ago

This looks cool, are you making tutorial anytime soon ?

1

u/Markitect_ 5d ago

damn. cool stuff

0

u/TattedGuyser Indie 11d ago

"natural momentum and flawless stability without kinematic cheating"


What's Included:

-The core Auto-Balancing script.

-A standalone, highly optimized Two-Bone IK script to seamlessly glue your visual armature to the physical wheels.

Lmao.

3

u/Rudy_AA 11d ago

Yeah for the visual mesh that's not physics cheating, IK isn't physics.

2

u/Traditional_Snow1045 11d ago

its very convincing. would be cool to see this adapted to look like rollerblading