Okay, so I’ve been messing around with this idea of making ragdoll volleyball games, and let me tell you, it’s been a wild ride. I wanted to capture that goofy, unpredictable physics fun, you know?

Getting Started
First things first, I needed a game engine. I went with Unity because I’ve dabbled in it before, and there are tons of tutorials out there. Plus, it handles physics pretty well, which is crucial for ragdolls.
I started by creating a basic scene: a court, a net, and some placeholder characters. Just simple cubes and cylinders to get the layout right.
Ragdoll Time!
Next up, the stars of the show – the ragdolls! Unity has a built-in ragdoll wizard, which is super helpful. Basically, you take a humanoid model, tell the wizard where the joints are, and it does most of the heavy lifting for you.
- Imported a basic humanoid model. Nothing fancy, just something to get started.
- Ran the Ragdoll Wizard. This involved dragging and dropping bones onto the correct slots. It felt a bit like playing digital doctor.
- Hit ‘Create’ and boom! Instant ragdoll… well, almost.
Tweaking the Physics
The initial ragdoll was… floppy. Like, really floppy. It collapsed in a heap the second I hit play. So, I spent a good chunk of time tweaking the Character Joints.
I played around with:
- Angular X/Y/Z Drive: Made the ragdoll resist the initial “floppiness.”
- Spring and Damper settings: Controls how quickly the joints “spring back”, add resistance.
It’s a constant back-and-forth. Too stiff, and it looks like a robot. Too loose, and it’s back to being a puddle of limbs.

Adding Movement (or Trying To)
Now for the tricky part: making these guys move. I didn’t want precise, controlled animations. I wanted flailing, chaotic movement that felt like the ragdolls were trying to play volleyball, but failing hilariously.
I experimented with a few approaches:
- AddForce: Applying forces to the ragdoll’s Rigidbody. This was okay, but it felt a bit floaty.
- AddTorque: Rotating the joints directly. This gave me more direct control, but it was also harder to make it look natural.
The key, I found, was to apply forces/torques to multiple body parts at once, and to keep the values relatively low. You want to nudge the ragdoll in the right direction, not launch it into orbit.
The Volleyball
The volleyball itself was pretty straightforward. Just a sphere with a Rigidbody and a Physics Material. I messed with the bounciness and friction settings until it felt right. Not too bouncy, not too sticky.
Putting It All Together
Getting the ragdolls to actually hit the volleyball was… challenging. It involved a lot of trial and error. I ended up using a combination of triggers and raycasts to detect when a ragdoll was close to the ball and then applying a force in the direction of the net.
It’s still far from perfect. Sometimes the ragdolls whiff completely. Sometimes they send the ball flying in the wrong direction. But that’s part of the charm, right? It’s supposed to be a bit messy and unpredictable.

Where I’m At Now
Right now, I have a basic prototype where two ragdolls can sort of, kind of play volleyball. It’s buggy, it’s silly, but it’s also surprisingly fun. I’ve got a long way to go, but it’s been a blast figuring things out along the way.
Next, I am going to work on adding a more realistic movement, or try to.