Joints
A joint constrains two rigid bodies relative to each other.
Joints are authored in ordinary project source through @react-three/rapier — the engine
ships the PhysicsAdapter observation protocol, not a second physics authoring format. A
component holds refs to the two bodies and calls the appropriate joint hook.
| Hook | Constraint |
|---|---|
useFixedJoint | Welds two bodies rigidly together. |
useRevoluteJoint | A hinge around one axis. |
usePrismaticJoint | A slider along one axis. |
useSphericalJoint | A ball-and-socket. |
useRopeJoint | Limits the bodies to a maximum separation. |
useSpringJoint | A soft constraint with rest length, stiffness, and damping. |
Each hook takes refs to two RigidBody instances plus the native tuple documented by
@react-three/rapier: local anchors, and then the joint-specific frames, axis, limits,
length, stiffness, or damping. The returned ref is Rapier’s own impulse-joint object.
See also
Section titled “See also”- Rigid bodies — the bodies a joint connects.
- Worlds and roots — why the JSX is the document.