HomeArticlesRagdoll Physics

Ragdoll Physics: Verlet Particles, Distance Constraints and Iterative Solving

How a character skeleton becomes a mesh of points and distance constraints solved by cheap, unconditionally stable relaxation.

mysimulator teamUpdated June 2026≈ 6 min read▶ Open the simulation

A skeleton made of points and distances, not bones and joints

Classic rigid-body ragdoll physics represents a character as a tree of rigid segments connected by angular joints with torque limits — accurate, but numerically stiff and prone to jitter under stacked constraints. This simulation instead uses Verlet integration with distance constraints, the same particle-based approach popularised for cloth and rope by Thomas Jakobsen's 2001 GDC paper "Advanced Character Physics." The body is just a set of point masses (head, shoulders, elbows, hips, knees, ...) connected by distance constraints — rigid or semi-rigid links that simply try to hold each connected pair of points at a fixed rest length.

live demo · a constrained particle skeleton reacting to a drag● LIVE

Verlet integration without storing velocity

Each point moves under Störmer-Verlet integration: instead of tracking position and velocity separately, it stores the current position and the previous position, and infers velocity implicitly from their difference.

// position (Störmer) Verlet — no explicit velocity needed
xNext = x + (x - xPrev) * damping + acceleration * dt * dt
xPrev = x
x = xNext
// velocity is implied by (x - xPrev); a constraint just moves x directly
// and the "velocity" automatically updates itself next step

This is exactly why position Verlet is the standard choice for constraint-heavy systems like cloth, rope and ragdolls rather than the velocity-explicit Euler or Runge-Kutta methods used for orbits elsewhere on this site: a constraint solver that needs to satisfy a limb-length or joint-angle condition can simply move a point to the correct position, and the implicit velocity — the (x − xPrev) difference — updates itself automatically and consistently, with no separate velocity variable to keep in sync.

Satisfying constraints: relaxation, not equations

A ragdoll typically has a dozen or more distance constraints (an upper arm, a forearm, a torso segment, a thigh, a shin, and so on) all coupled to shared joints, and solving them exactly and simultaneously is an expensive linear system. The Jakobsen approach instead uses iterative relaxation: loop over every constraint and nudge each pair of connected points directly toward satisfying its own rest length, ignoring every other constraint for that instant, then repeat the whole pass several times.

for (let iter = 0; iter < NUM_ITERATIONS; iter++) {
  for (const c of constraints) {
    const delta = c.p2.pos.sub(c.p1.pos);
    const dist = delta.length();
    const diff = (dist - c.restLength) / dist;
    const correction = delta.scale(0.5 * diff);
    if (!c.p1.pinned) c.p1.pos.addInPlace(correction);
    if (!c.p2.pinned) c.p2.pos.subInPlace(correction);
  }
}
// each pass only approximately satisfies every constraint;
// repeated passes converge toward a mutually consistent pose

This is a Gauss-Seidel style iterative solver, not a direct linear solve: it doesn't compute the mathematically exact solution in one pass, it approaches it asymptotically. More iterations per frame make the skeleton feel stiffer and less rubbery — too few iterations and long limb chains visibly stretch under load — which is exactly why constraint iteration count is one of the most consequential tuning knobs in this kind of simulation, trading visual rigidity directly against CPU cost.

From distance constraints to joint limits

A plain distance constraint alone would let an elbow bend backward through 360° with no resistance, which looks wrong the instant a ragdoll flops into an unnatural pose. Believable ragdolls add angular constraints on top of the distance constraints — extra links or explicit angle checks that keep, say, the upper-arm-to-forearm angle within an anatomically plausible range — while still relying on the same iterative relaxation loop to enforce them approximately alongside the distance constraints, rather than solving a fully rigid joint hierarchy exactly.

Why this approach dominates in games

Position-based, Verlet-integrated constraint systems (the general family now often called Position Based Dynamics, formalised by Müller et al. in 2007) are popular in real-time games and interactive demos for three practical reasons: they are unconditionally stable regardless of how hard you drag a point, because you're directly setting positions rather than integrating forces that could blow up; they compose trivially with other position-based constraint types (cloth, rope, soft bodies) in the same solver; and their cost scales linearly and predictably with the number of constraints and iterations, which makes performance easy to budget in a real-time game loop — a sharp contrast with rigid-body solvers, which can become numerically stiff and unstable exactly when a scene gets interesting (a pile of ragdolls, a stack of boxes).

Frequently asked questions

Why doesn't this ragdoll simulation track velocity directly?

It uses Störmer-Verlet integration, which stores the current and previous position instead of an explicit velocity. Velocity is implied by their difference, which means a constraint solver can just move a point to a new position and the correct velocity for the next step falls out automatically.

Why does dragging a ragdoll sometimes make its limbs look stretchy?

The constraint solver uses iterative relaxation rather than an exact simultaneous solve — each pass only partially satisfies every distance constraint. With too few iterations per frame, long chains of connected points (like an arm) visibly stretch beyond their rest length under a strong drag before the solver can catch up.

Is this the same technique used in commercial game engines?

It's the same family, generally called Position Based Dynamics (PBD): particles with distance and angle constraints solved by iterative relaxation under Verlet integration. It's popular specifically because it's unconditionally stable and composes easily with cloth and rope in the same solver, unlike rigid-body joint solvers.

Try it live

Everything above runs in your browser — open Ragdoll Physics and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Ragdoll Physics simulation

What did you find?

Add reproduction steps (optional)