Joints & constraints

Pin bodies together, hinge them, weld them, or pull them toward a goal — the connective tissue that turns loose objects into mechanisms.

A simulation is rarely just free-falling objects. You want a door that swings on its frame, a chain whose links stay linked, a ragdoll whose limbs hang from its joints. DNA gives you a small set of nodes for that — and they all feed the same solver, so they cooperate cleanly inside one simulation.rigid_body or particle setup.

Articulation joints

The constraint.spring node (Physics Joint) connects two rigid bodies and holds a relationship between them. You pick the kind from the node:

Joints are fully animatable. Their anchor points, stiffness, damping and limits are ordinary parameters, so you can keyframe a hinge motor to open a door on cue, or drive a joint's stiffness from audio. See Keyframing.

A weld captures its hold-angle at the moment the sim begins cooking. If a welded assembly looks wrong, check that the bodies are already in their intended relative pose on frame 0 — the weld preserves whatever it sees first.

Goal-pull (shape matching)

Not every "constraint" is a joint between two bodies. The solver can also pull a cluster of points back toward a target shape — a soft, springy version of rigidity. This is how simulation.soft_body keeps its form while still wobbling, and it's the basis for "approximately rigid" looks that recover after being squashed.

You don't wire this up as a separate node; it comes from the soft body and shape-matching behaviour built into the sims themselves. Think of it as "remember where you started, and try to get back there."

How they all relate

Everything here — ball/hinge/weld joints, distance links inside cloth and hair, the goal-pull of soft bodies — is resolved together in a single pass by the solver. You don't choose an execution order or worry about which constraint "wins"; they're balanced against each other every frame.

That means you can freely mix them: a hinged simulation.rigid_body panel can rest on a simulation.cloth sheet, joined parts can collide with everything else, and it all settles in one solve. See Forces & collisions for how contact fits into the same picture.

When to use which

There's no CPU physics engine under the hood — every joint and constraint runs on the GPU as part of the same simulation step. You set up the relationships; the solver does the balancing.

See also