By · Updated

Ragdoll Physics Game

Throw a Ragdoll Around a 2D Physics Playground

No ratings yet

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Ragdoll Physics Game works

This ragdoll physics game lets you fling a jointed figure. A jointed ragdoll drops onto a couple of ledges and a bumper. Grab it by the head, an arm or a leg and throw it with the mouse, press Fling to launch every doll on screen, or click empty space to drop another one. The sliders change ragdoll size, gravity and playback speed while everything keeps moving; turn gravity to zero and the dolls drift.

Ragdoll physics game: getting a good result

A ragdoll is the simplest way to make a character fall convincingly: instead of animating it, you build the body from rigid pieces and connect them with joints, then let the physics engine work out how it tumbles. This toy does exactly that with eleven parts — head, chest, hips, and upper and lower segments for each arm and leg — pinned together at the neck, waist, shoulders, elbows, hips and knees. The joints are point constraints, so each limb can swing freely around its pivot, and the parts of one doll are set to ignore collisions with each other so the limbs pass through the body rather than snagging on it.

Throwing. Dragging a limb attaches a soft spring between the mouse and that part, and the rest of the body follows through the joints. Whip the mouse and let go to throw; the doll keeps whatever velocity the grabbed limb had. Fling gives every part of every doll the same random upward kick, so the whole body launches together and then flops on landing.

Sliders. Size rebuilds nothing already on screen; it sets how big the next ragdoll is, so you can mix a giant with a crowd of small ones. Gravity and speed apply immediately: low gravity gives slow, floaty tumbles that show how the joints move, and speed above 1 makes collisions more violent because the engine takes bigger steps.

Why it looks alive. Nothing here is scripted. The loose, slightly comic motion comes from the joints having no stiffness of their own, so a ragdoll folds wherever gravity and the last collision push it, which is also why real games blend ragdoll physics with animation only at the moment a character falls. Pause and Save PNG capture a pose; Reset returns to a single fresh ragdoll. All of this runs in your browser on the Matter.js engine.

FAQ

How do I throw a ragdoll?

Grab any limb, whip the mouse and let go. Dragging attaches a soft spring between the pointer and that part, and the doll keeps whatever velocity the grabbed limb had when you release.

Why do the limbs pass through the body?

The parts of one doll are set to ignore collisions with each other so the limbs do not snag on the torso. Different dolls still collide with each other and with the ledges.

Does the size slider change the dolls already on screen?

No. It sets the size of the next ragdoll you add, so you can mix a giant with a crowd of small ones. Gravity and speed apply immediately to everything.

Why does a high speed setting make the collisions more violent?

Speed above 1 makes the engine take bigger steps per frame, so parts move further between collision checks and land harder. Drop the speed for gentler, more accurate tumbles.

See also: all Simulations & Screensavers tools, Images, Audio, Video & Screen, PDF, SVG, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.

Related tools