Physics joints and ragdolls
The current state of G9 (milestones): joint nodes over Jitter2 (3D) and Box2D
(2D) with limits, motors, springs and breaking; their debug draw and editor gizmo; rigid-part ragdolls
(Ragdoll3D); skeleton ragdolls (PhysicalBone3D, PhysicalBoneSimulator3D) and the editor’s Create physical
skeleton; limit handles in the editor’s viewport (G9.7); MotorJoint2D (G9.10a); Generic6DofJoint3D on the engine’s
own Jitter2 constraints (G9.10b); active ragdolls (G9.10c). G9 is complete. Decisions: ADR 0201 (the first 2D joints),
ADR 0211 (3D joints, the other 2D joints, breaking, editor) and
ADR 0212 (ragdolls); the limit handles use the G7.3 handle
API (ADR 0213). ADR 0234 records the custom constraints and
ADR 0235 the active ragdolls; G9.10’s proposal
moved into this page (Changes from the G9.10 proposal). Bodies, spaces and signals
are in Physics.

| File | Contents |
|---|---|
Physics/3D/Joint3D.cs, Joints3D.cs | Joint3D and the six 3D types |
Physics/3D/Generic6DofJoint3D.cs | Generic6DofJoint3D, JointAxisMode |
Physics/3D/Constraints/ | The engine’s Jitter2 constraints (ADR 0234): SixDofLinear, SixDofAngular, their drives, SixDofMath, SoftRow |
Physics/3D/PhysicsSpace3D.Joints.cs | JointRecord3D, creation and re-creation, constraint factories, exclusion, springs, breaking, debug draw |
Physics/2D/Joints2D.cs, PhysicsSpace2D.Joints.cs | Joint2D, the six 2D types, JointRecord2D |
Physics/Ragdoll/ | Ragdoll3D, PhysicalBone3D, PhysicalBoneSimulator3D, BoneDrive3D (active ragdolls’ internal drive nodes) |
Physics/3D/Constraints/PoseDrive.cs | The active-ragdoll drive (ADR 0235): a soft angular block and soft linear rows, capped |
Editor/Src/Inspector/JointInspector.cs, Skeleton3DInspector.cs | Rebuild, Swap A/B; Create physical skeleton |
Editor/Src/Viewport/Handles/JointHandles.cs | The limit handles (G9.7): JointFrame, the shared angle and drawing math, a provider per joint type |
Every Jitter2 and Box2D call stays in Src/Physics (the pinned-version rule in Physics → Libraries).
The node model
Section titled “The node model”Godot’s: a joint is a node whose global pose gives the anchor and axes; NodeA/NodeB are paths to physics bodies
(the inspector’s picker lists only PhysicsBody3D/PhysicsBody2D); an empty path is the static world (Jitter2’s
NullBody, a shapeless static Box2D body per space). Both bases have:
| Member | Notes |
|---|---|
NodeA, NodeB | Changing one re-creates the joint like Rebuild(): frames re-captured and IsBroken cleared (it is a new joint). So do the shape-giving DistanceJoint3D.AnchorB, GrooveJoint2D.Length/InitialOffset and DampedSpringJoint2D.Length |
ExcludeNodesFromCollision (3D) / DisableCollision (2D) | Default true: the joined bodies don’t collide while the joint exists and is enabled |
Enabled | 3D: the constraints are disabled and kept. 2D: the Box2D joint is destroyed and re-created (no enable flag). A node under ProcessMode.Disabled counts as off |
BreakForce, BreakTorque | 0 = never. N and N·m in 3D, kg·px/s² and kg·px²/s² in 2D |
Broken (signal), IsBroken, Rebuild() | Rebuild() re-resolves paths, re-captures frames from the current poses and clears IsBroken |
BodyA, BodyB, IsActive | IsActive: created in the space (bodies present, not broken; in 3D, one body dynamic) |
GetAppliedForce(), GetAppliedTorque(), GetSeparation() | The last step’s force and torque (the breaking values once broken); the anchors’ distance |
DrawDebug(lines, color) | Draws the joint’s shape; the editor draws the selected joint with it |
2D keeps ADR 0201’s ConstraintHertz/ConstraintDampingRatio (Box2D’s softness, live). 3D uses Jitter2’s default
softness and bias (no exports).
3D types
Section titled “3D types”Angles are exported in degrees with a radians property for code, like CharacterBody3D.FloorMaxAngleDegrees.
| Type | Jitter2 constraints | Axis | Members (all live unless noted) |
|---|---|---|---|
PinJoint3D | BallSocket | — | — |
HingeJoint3D | BallSocket, HingeAngle, AngularMotor | local Z | UseLimit, LowerAngleDegrees (−90), UpperAngleDegrees (90); MotorEnabled, MotorTargetVelocity (rad/s), MotorMaxTorque (100 N·m); SpringEnabled, SpringFrequency (2 Hz), SpringDampingRatio (0.5), SpringTargetAngleDegrees; GetAngle() |
SliderJoint3D | PointOnLine, FixedAngle (or HingeAngle with AllowTwist), LinearMotor | local X | AllowTwist (re-creates); UseLimit, LowerDistance (−1 m), UpperDistance (1 m); motor (m/s, MotorMaxForce 100 N); spring (SpringTargetPosition); GetPosition() |
ConeTwistJoint3D | BallSocket, ConeLimit, TwistAngle | local X | SwingSpanDegrees (45), TwistSpanDegrees (180); 180° switches that limit off; GetSwingAngle(), GetTwistAngle() |
DistanceJoint3D | DistanceLimit | origin → AnchorB | AnchorB (local, default (0, −1, 0); re-creates); MinLength (0 = slack), MaxLength (0 = the authored distance for a rope, no maximum for a spring); SpringFrequency (0 = no spring), SpringDampingRatio, RestLength (0 = authored); GetLength() |
WeldJoint3D | BallSocket, FixedAngle | — | — (usually with BreakForce) |
Generic6DofJoint3D | the engine’s SixDofLinear, SixDofAngular and their drives (below) | local X, Y, Z | per axis, in “Linear X”…”Angular Z” groups: …Mode (Free, Limited, Locked; default Locked: a weld); limits LinearXLower/Upper (−1, 1 m), AngularXLowerDegrees/UpperDegrees (−45°, 45°; Y within −90°…90°); motor (…MotorEnabled, …MotorTargetVelocity m/s or rad/s, LinearXMotorMaxForce 100 N, AngularXMotorMaxTorque 100 N·m); spring (…SpringEnabled, …SpringFrequency 2 Hz, …SpringDampingRatio 0.5, LinearXSpringTarget, AngularXSpringTargetDegrees); GetLinearOffset(), GetAngularOffsetDegrees(), GetLinearMode(axis), GetAngularMode(axis) |
Angles are body B relative to A, right-handed about the axis, measured from the authored pose. Motors always exist: off is a maximum force of 0, so toggling one never re-creates the joint.
Springs are frequency + damping ratio everywhere. Jitter2 has no angular or prismatic spring, so hinge, slider and
distance springs are an engine PD spring applied before each step: the velocity an implicit Euler step of
x” = −ω²x − 2ζωx’ would reach, turned into equal and opposite torques (forces at the anchors), with the effective
inertia about the joint’s anchor. It is stable for any stiffness and independent of the masses; the frequency is
clamped to a quarter of the tick rate. Jitter2’s SpringConstraint is not used: it ignores body rotation.
2D types
Section titled “2D types”ADR 0201’s PinJoint2D (revolute: radians limits, motor, now also SpringEnabled, SpringHertz,
SpringDampingRatio, SpringTargetAngle, GetAngle()) and DampedSpringJoint2D (distance joint: Length,
RestLength, SpringHertz, SpringDampingRatio) are unchanged, joined by:
| Type | Box2D | Members (pixels; all live unless noted) |
|---|---|---|
SliderJoint2D | prismatic, along the joint’s X | UseLimit, LowerTranslation, UpperTranslation; motor (px/s, MotorMaxForce); spring (SpringHertz, SpringDampingRatio, SpringTargetTranslation); GetTranslation() |
GrooveJoint2D | wheel joint, spring off, limit on; axis = the joint’s +Y | Length (50), InitialOffset (25): body A holds the groove, B’s anchor starts InitialOffset along it (both re-create) |
WeldJoint2D | weld | LinearHertz, AngularHertz (0 = rigid), LinearDampingRatio, AngularDampingRatio |
WheelJoint2D | wheel, along the joint’s X (turn it −90° for a car’s suspension) | SpringEnabled (true), SpringHertz (1), SpringDampingRatio (0.7); UseLimit, LowerTranslation, UpperTranslation; motor (rad/s, MotorMaxTorque) |
MotorJoint2D (G9.10a) | motor: a spring pulls frame B onto frame A moved by the offsets, plus a capped relative velocity | LinearOffset (px, in frame A’s axes), AngularOffset (rad); spring: LinearHertz/AngularHertz (4; 0 = that spring off), LinearDampingRatio/AngularDampingRatio (1), MaxSpringForce (10 000 kg·px/s² = 100 N), MaxSpringTorque (1 000 000 kg·px²/s² = 100 N·m); velocity: LinearVelocity (px/s, world axes), AngularVelocity (rad/s), MaxVelocityForce/MaxVelocityTorque (0 = off) |
Box2D’s prismatic and wheel axis is frame A’s X, so the groove’s frames are turned a quarter turn (FrameAngle).
MotorJoint2D. Box2D’s own defaults are all zero (a joint that does nothing); the engine’s pull body B onto its
target as soon as it is added. The offsets move the authored frame A (b2Joint_SetLocalFrameA), so the record keeps the
authored frames and Rebuild() still starts from them. With velocities of 0 the velocity part is friction: exactly
MaxVelocityForce / mass (top-down ground friction is a motor joint to the world). Box2D reads LinearVelocity in world
axes, not body A’s or the frame’s. For a target that moves (the Demo’s lift), set the velocity to the target’s too: the
spring alone trails it (a 4 Hz spring trails a target moving at 140 px/s by about 10 px). The debug draw puts anchor A at
the target, with a cross and the target’s +X, so the line to body B’s anchor (red over 5 px) shows how far off it is.
Custom constraints
Section titled “Custom constraints”
Generic6DofJoint3D is built on constraints the engine writes (ADR 0234):
Constraint<T> subclasses in Physics/3D/Constraints/ whose static Prepare/Iterate run on Jitter2’s worker
threads. A constraint’s data is at most 256 bytes including Jitter2’s 32-byte header, so a joint has four:
| Constraint | Rows |
|---|---|
SixDofLinear | Locks and limits along frame A’s axes on B’s anchor’s offset, each body’s arm to its own anchor (stable however fast body A spins) |
SixDofAngular | Locks and limits on the relative rotation’s XYZ Euler angles (Rx·Ry·Rz; Y in −90°…90°) |
SixDofLinearDrive, SixDofAngularDrive | Motors (velocity rows capped at force × dt) and springs (soft rows) |
- Locks and limits use Jitter2’s default softness and bias, so a 6-DOF joint feels like the others at its limits. Limits are speculative (Box2D’s): a limited axis is always solved against its nearer limit, and inside the range only stops the body from crossing it this step. Jitter2 prepares constraints each substep with the whole step’s dt, so a limit that waited to be crossed let a fast body through by a step’s motion.
- Angular rows use each Euler angle’s exact rate axis: the dual basis of A’s X, B’s Z and their cross product, so
rate = axis · (ωB − ωA)(tested numerically). The axes grow near Y = ±90° (gimbal lock), hence the limit. - Springs are soft rows in the solver (
SoftRow, Box2D’sb2MakeSoft): frequency and damping ratio, stable at any stiffness and independent of mass. They differ from the hinge, slider and distance PD springs (below) in where they run, not in their parameters. - Drives cost nothing when off: a drive with no motor or spring on returns at once.
- Breaking counts the linear rows and drives as force, and the angular rows and springs as torque (not motors).
- Debug draw: the frame’s three axes, a track with ticks per limited linear axis, and an arc with its ends and the current angle per limited angular axis (about X from Y towards Z, about Y from Z towards X, about Z from X towards Y). Red when a locked or limited axis is more than 5 cm or 5° past what it allows.
In the space
Section titled “In the space”- Records and deferred creation. A joint registers a record with its viewport’s space on entering the tree. The
space creates it at its flush (before a step or a query), after the bodies’ shapes and masses, so tree order and the
order paths are set in don’t matter. Paths resolve with
GetNodeOrNullfrom the joint. A path to a non-body or to another world’s body, or both paths on one body, logs one error; both paths empty is a silent inactive joint. - Frames are the joint’s pose (and a type’s second anchor) in each body’s local space, captured as soon as both
bodies are present and kept while the paths stay the same — even for a joint that is disabled or waiting for a dynamic
body. A kinematic body’s node move is a target the next step applies, so the frames use the node’s pose then (a
ragdoll moved to its spawn point right after it was added). 3D constraints are initialised and then their data is set
from the frames (
LocalAnchor1/2, axes,Q0= the authored relative rotation), so a re-created joint joins its bodies as authored and measures its limits from the authored pose wherever the bodies are. Moving a joint node after creation does nothing (Godot);Rebuild()re-captures. - Bodies leaving, kinematic bodies. A body leaving the space (freed, removed, disabled) destroys its joints first;
they wait and come back when it returns. Jitter2 keeps no constraint between two non-dynamic bodies: such a joint is
not created (
IsActivefalse) until one body is dynamic again, and a body’s kind change re-creates its joints. Box2D keeps joints across type changes. - Collision exclusion (3D): each body record holds a copy-on-write
Excludedarray the broad-phase filter reads on Jitter2’s worker threads, replaced between steps; turning exclusion on clears the pair’s contacts. Ragdolls use exclusion groups instead (below). 2D sets Box2D’scollideConnected. - Breaking. 3D: after the step, joints with a threshold (a
_breakablelist) sum their last substep’s linear impulses (socket, point-on-line, distance, linear motor) and angular ones (hinge, fixed, cone, twist) and divide by the substep length. 2D: Box2D’s thresholds andb2World_GetJointEvents. A breaking joint is destroyed,IsBrokenset, andBrokenraised after the body signals, in joint creation order; handlers may free nodes (freed joints are skipped), and a joint a body-signal handler rebuilt in that step raises noBroken. - Edit mode creates records like bodies but never steps, so joints draw grey at their nodes.
Debug draw and editor
Section titled “Debug draw and editor”PhysicsServer3D/2D.DebugDrawEnabled draws shapes and joints; DebugDrawJoints draws joints only (the Demo panels’
Joints toggle). Each type draws its anchors (a line between them when they separate) and its shape: a hinge’s axis,
limit arc and current angle; a slider’s track, limit ticks and position; a cone-twist’s swing cone and twist arc; a
spring’s zigzag; a weld’s box; the 2D equivalents. Amber, red when stretched (more than 5 cm/5 px, or past a distance
joint’s maximum), grey when pending, disabled or broken. Lines follow the bodies’ interpolated poses.
The editor (Editor):
- Selected joint:
DrawDebugin the selection colour on top, and a line to each body its paths name (a red marker for a path that names none). - Warnings on the scene tree row: both paths empty, a path to nothing, to a non-body, or both to one body.
- Inspector: Rebuild (
refresh) and Swap A/B (arrows-right-left, one undo step) icon buttons above the rows. - Limit handles (G9.7, below).
- Icons (Physics family):
link(bases),point(pins),door(hinge),arrows-right-left(sliders),ripple(cone-twist),ruler-2(distance),lock(welds),arrows-up-down(groove),circle(wheel),magnet(motor),arrows-move(6-DOF),bone(ragdolls, physical bones),sitemap(simulator). - Dev overlay: the Physics panel shows joints (active) and joints broken per second.
Limit handles
Section titled “Limit handles”
A selected joint’s limits are handles (G7.3’s API, one
IHandleProvider per type in JointHandles.cs): a drag is one undo entry (“Set Upper Angle Degrees on Hinge5”), Esc or
a right click puts it back, Snap snaps angles to the rotate step and distances to the move step, and values clamp to the
property’s Range. They sit on the joint’s frame at its node (the editor never steps physics, so that is where the
joint is authored) and are drawn in light blue over the selected joint’s debug draw.
| Node | Handles |
|---|---|
HingeJoint3D | LowerAngleDegrees, UpperAngleDegrees at the ends of an arc about local Z |
SliderJoint3D | LowerDistance, UpperDistance on local X |
ConeTwistJoint3D | SwingSpanDegrees on the cone’s rim (on the side towards the camera’s right), TwistSpanDegrees at the end of the twist arc (from local Y towards Z) |
DistanceJoint3D | MinLength, MaxLength on the line to AnchorB |
Generic6DofJoint3D | Per axis that isn’t locked, a lower and an upper handle: on the axis for linear limits, on an arc about the axis for angular ones (the arcs at 100 %, 85 % and 70 % of the radius). A Free axis has hollow handles; dragging one makes it Limited in the same undo entry |
PhysicalBone3D | Its JointType’s “Joint” group (cone-twist spans, hinge angles or slider distances) at body × JointOffset; none for Pin and None |
PinJoint2D | AngularLimitLower, AngularLimitUpper (radians; the label shows degrees) |
SliderJoint2D, WheelJoint2D | LowerTranslation, UpperTranslation on local X |
GrooveJoint2D, DampedSpringJoint2D | Length on local +Y: the groove’s end, the spring’s longest stretch (re-creates the joint) |
- Angles come from where the mouse ray meets the arc’s plane (the dragged point on the handle’s tangent when the view looks along the plane), and the angle kept is the one nearest the previous value: a hinge dragged past ±180° stops there instead of jumping to the other end. A span is the absolute angle, 0–180°.
- Arcs are drawn at 15 % of the view’s height (at least the debug draw’s 0.2 m / 10 px), so the two handles of a hinge stay apart at any zoom; linear limits are at their real distances.
- Off limits have hollow handles: a hinge, slider or 2D limit with its toggle off (“Upper Angle: no limit — drag to set”), a 180° span (“free”), a distance joint’s 0 lengths (max at the authored length: “the authored 2.00 m”, or “none” for a spring; min at a quarter of it, “slack”). Dragging one sets the value and turns the toggle on in the same undo entry.
- Order: a lower or minimum handle stops at its upper or maximum, and the other way round.
Ragdolls
Section titled “Ragdolls”Ragdoll3D
Section titled “Ragdoll3D”A node whose direct RigidBody3D children are the parts, joined by ordinary joint nodes under it. Parts are flat
siblings because a parent’s physics pose write teleports body children. Visuals hang under each part.
| Member | Notes |
|---|---|
Simulating | Off: the parts are held kinematic and follow their nodes (an AnimationPlayer or code moves them; they push what they touch). Saved |
ExcludePartCollisions | Default true: the parts never collide with each other, joined or not |
StartSimulation() | Parts dynamic, each with the velocity of its last kinematic move; SimulationStarted |
StopSimulation() | Parts held kinematic where they are; SimulationStopped |
ApplyImpulse(part, impulse, position), GetParts(list) |
Holding is run-time state (RigidBody3D.HeldKinematic, internal): the parts’ saved Mode is untouched. Held bodies are
not interpolated, so moving their nodes every frame becomes exact kinematic velocities. Joints between two held parts
wait and come back, at their authored frames, when the simulation starts. Exclusion is a group id shared by the parts
(CollisionObject3D.ExclusionGroup), checked by the broad-phase filter. A part that leaves the ragdoll (removed,
reparented: a dismembered arm) drops both and is an ordinary body again; one that is added picks them up.
PhysicalBone3D and PhysicalBoneSimulator3D
Section titled “PhysicalBone3D and PhysicalBoneSimulator3D”Godot 4.3’s structure: a PhysicalBoneSimulator3D is a child of a Skeleton3D and its PhysicalBone3D children
(rigid bodies) drive bones.
PhysicalBone3D | Notes |
|---|---|
BoneName | The bone it drives |
BodyOffset | The body relative to the bone (live) |
JointType | None, Pin, ConeTwist (default), Hinge, Slider: the joint to the physical bone of the nearest ancestor bone |
JointOffset | The joint frame relative to the body. Changing it or JointType re-creates the joint, at the ready pose |
| “Joint” group | SwingSpanDegrees (45), TwistSpanDegrees (30), LowerAngleDegrees/UpperAngleDegrees, LowerDistance/UpperDistance: live |
PhysicalBoneSimulator3D | Notes |
|---|---|
Influence | 0–1: how much of a simulated bone’s pose comes from its body (the rest from the animation) |
PhysicalBonesStartSimulation(names) | Empty: every bone. Each keeps its last kinematic velocity |
PhysicalBonesStopSimulation(), IsSimulating, PhysicalBones | |
Build(skeleton) | A physical skeleton for the skeleton (see below), not added |
On ready (in the editor only inside a running Simulate, G7.5) the simulator puts each body at its bone’s pose × BodyOffset, remembers
that ready pose, and creates each joint as an internal child node (no owner: not saved, not in the editor’s tree) whose
frames are set from the ready poses, so joint limits are measured from the pose the skeleton had then — also for a
joint re-created at run time by a new JointType or JointOffset. Held bodies follow the animated bones in the fixed
step (kinematic moves: they push and are hit by rays). Simulated bones’ poses are written in OnProcess at process
priority 1000 — after AnimationPlayer, before skinning — from their bodies’ rendered poses, parents first, blended
by Influence with the animated pose. The animated pose is kept per bone: a bone still holding what the blend wrote
last frame (no track, a paused clip, an animation stepped at the physics rate) blends with the stored one, so the blend
never feeds back into itself. The bodies of one simulator never collide with each other; a physical bone that leaves
the simulator is an ordinary body again.

Create physical skeleton is the Skeleton3D inspector’s bone button (hidden once the skeleton has a simulator): it
adds PhysicalBoneSimulator3D.Build(skeleton) as one undo step. Build makes a body per bone at least 5 cm long: a
capsule from the bone to its first child, radius 20 % of the length, centred halfway with its axis along the bone, and
a 45°/30° cone-twist at the bone with its twist axis along the bone. Every body keeps the default 1 kg: equal masses
keep a chain of joints stiff (ADR 0212). The limits are generic; hinged knees and elbows from a humanoid map wait for
G1c’s HumanoidMap/HumanoidLimits (Animation authoring).
Active ragdolls
Section titled “Active ragdolls”G9.10c (ADR 0235): simulated physical bones pulled towards the animation, so a character staggers when hit and keeps standing.
PhysicalBoneSimulator3D (“Drive” group) | Default | Notes |
|---|---|---|
DriveStrength | 0 | 0–1: every local drive (each simulated bone towards its animated rotation relative to its parent bone’s body). 0 is a passive ragdoll |
DriveFrequency, DriveDampingRatio, DriveMaxTorque | 30 Hz, 1, 200 N·m | At full strength |
HoldStrength | 0 | 0–1: every world hold (a bone with a HoldStrength towards its animated world pose) |
HoldFrequency, HoldDampingRatio, HoldMaxForce, HoldMaxTorque | 15 Hz, 1, 2 000 N, 500 N·m | At full strength |
PhysicalBone3D (“Drive” group) | Default | Notes |
|---|---|---|
DriveStrength | 1 | Scales the simulator’s for this bone (0: a limp bone in an active body) |
HoldStrength | 0 | This bone’s hold. Build sets 1 on the root body (the pelvis) |
GetDriveErrorDegrees(), GetHoldError() | How far the body is from its animated rotation (relative to its parent’s body) and position, while simulated, at any strength: fade a hold out and read it to tell a character has fallen |
- How: each bone gets two internal
BoneDrive3Djoint nodes (no owner: not saved, not in the editor’s tree), a local drive to its nearest ancestor’s body and a hold to the world, each aPoseDriveconstraint. Strength × the frequency and maximum are written every fixed step with the target; 0 turns the force off (a call’s cost). - Targets are the animated pose the simulator keeps per bone (the pose the animation set, not what the blend wrote back), composed parents first, so the bodies never chase themselves.
- Stiffness: a drive’s is its body’s inertia × (2π·frequency)², a hold’s its body’s mass × (2π·frequency)², and a spine drive or pelvis hold carries the whole body: hence the 30 Hz and 15 Hz defaults. A held body follows a moving target and is kept awake (Jitter2’s sleep timer restarts), and one whose drive stops falls.
- Substeps: an active ragdoll needs at least 2 (
project.mfproj"physics": { "3d": { "substeps": 2 } }). Soft rows on a stack of light bodies need the convergence: at 1 the Demo character’s chest staggered 33 cm and was still 7 cm off 1.5 s later; at 2, 18 cm and back within 7 mm. - Partial bodies:
PhysicalBonesStartSimulation(["Shoulder.L", …])makes one limb active against the held rest (the drive works against a kinematic parent). - Limits: Create physical skeleton’s generic cone-twists (45°/30°, at the ready pose) don’t reach every animated pose: the Demo’s upper arms stay about 29° off. Humanoid limits are G1c.
- The Demo (Animation 3D): holds on the pelvis and the head (a spine drive alone lets the tall upper body sag), 2 substeps, and Active (fades both strengths in over 0.3 s), Push (40 N·s to the chest) and Let go (fades them out: it falls).
Networking and determinism
Section titled “Networking and determinism”Joints are server-side state like bodies: the server simulates and replicates poses through the game’s [Replicated]
members; clients may run cosmetic ragdolls. With PhysicsSettings3D.Deterministic and one thread, joint scenes
reproduce on one machine and build (the physics-joints render test relies on it). Physics is single precision and not
a cross-platform lockstep (ADR 0020).
Performance and allocation
Section titled “Performance and allocation”Joint records, constraint objects and exclusion arrays are allocated when joints are created; per step, springs,
breaking, readback and debug draw iterate pre-sized lists. A 100-link pinned chain steps in about 57 µs and 50 rigid
ragdolls of 11 parts (500 joints) in about 0.6 ms (Release, one thread, M-series Mac; JointBenchmarks), allocating
nothing.
- Unit (
Tests/MainframeEngine.Tests/Physics/):PoseDriveTests(data size, a target rotation reached, a hold against gravity, the torque cap, mass independence, a turned body A, stopping),ActiveRagdollTests(on a four-bone arm: passive by default, drives keep it straight, a held root and a weak drive, stopping, the hold error with the hold off, targets from the animation not the write-back, round trips without the drive nodes, 0 B a step),SixDofConstraintTests(data sizes, Euler round trips, each angle’s rate axis, soft-row coefficients),Joints3DTests(pendulum period within 2 %, anchors within 1 cm under load, hinge limits, motor speed and torque, slider range andAllowTwist, cone and twist spans, rope slack, spring period, PD springs, a welded cantilever; joints before their bodies, bodies leaving and returning, disabled joints and bodies, kinematic pairs, invalid paths logged once, collision exclusion; scene round trips; the 6-DOF weld default, a free axis, a lower limit, a square range from two limits, per-axis angular limits, an angular motor, a spring’s period, a live mode change, breaking, a round trip, and a multi-threaded deterministic scene that steps the same twice),JointBreakTests,Physics2DJointTests(every 2D type,Enabled, pin springs; the motor joint’s offsets, world-axes velocity, friction, hertz 0, live offset,Enabledand breaking),Ragdoll3DTests,PhysicalBonesTests,DebugDrawTests(DebugDrawJoints, the motor joint’s target), and allocation gates (JointAllocationTests: 370 3D joints, 50 of them 6-DOF; the 2D gate has one joint of each type, the motor joint’s offset changed every frame). - Editor (
JointEditorTests, the 6-DOF handles inJointHandleTests): warnings, body-only pickers, Swap A/B undo, Rebuild, Create physical skeleton as one undo step.JointHandleTests: every type’s provider and handle positions, angles from the ray (and the edge-on fallback), snapping, clamping, lower ≤ upper, hollow handles that turn a limit on, the ±180° stop, the physical bone’s joint frame, the 2D types, a viewport drag that is one undo entry and Esc that restores it, and 0 B per frame. The editor repo’s walkthrough QA selects the bridge hinge, drags its upper limit and creates the character’s physical skeleton. - Render test
physics-joints: a hinged bridge, a cone-twist mannequin and a broken weld with the joint debug draw, frame 90 (moltenvk golden; lavapipe still to record). - Demo (
PhysicsJointsSceneTests): the bridge holds, the sign’s weld breaks and resets, the mannequin falls and stands, the gimbal tilts within its limits and springs back level, the active character (ActiveRagdollSceneTests, 2 substeps) stands with its pelvis and head within 5 and 10 cm, staggers more than 10 cm when pushed and is back within 5 cm in 1.5 s, falls when let go, and moves one arm alone, the drawer stops at 0.4 m and soft-closes, the chain hangs, the car drives and turns, the lift follows its target within 10 px carrying its crates, the skinned character ragdolls with its joints holding.
Differences from the plan
Section titled “Differences from the plan”- Constraints, not Jitter2’s composite
Joints, so frames and rest rotations can be written directly. - The distance spring is the engine’s PD spring, not Jitter2’s
SpringConstraint(it ignores body rotation). - PD springs are implicit, with the inertia about the anchor; the frequency clamp is kept.
- A breaking 3D joint is destroyed (as in 2D), not disabled.
- Frames are captured as soon as both bodies exist, not at the first creation, so limits of joints between kinematic bodies are measured from the authored pose.
- Ragdoll parts and physical bones share an exclusion group instead of pairwise exclusion;
Ragdoll3Dholds parts through internal state rather than writing theirMode. - Physical-bone joints are internal child nodes of the simulator (unowned), reusing the joint machinery.
Buildgives every body 1 kg instead of a mass from its volume.- No new icon SVGs: joint icons reuse the editor atlas (no
cone,steering-wheel,accessible). - The 2D pin keeps ADR 0201’s radians names (
AngularLimitLower…) rather thanLowerAngleDegrees. - The showcase render-allocation scene has no joint chain: it would change its goldens; the unit gate covers joints.
- Limit handles also cover
PhysicalBone3D, the 2D groove and spring lengths, and off limits (hollow handles that turn the limit on); the mockup showed only a hinge’s arc. They are drawn at a view-relative radius, not the debug draw’s fixed one. - Not yet: humanoid limits (G1c).
Changes from the G9.10 proposal
Section titled “Changes from the G9.10 proposal”G9.10 (Generic6DofJoint3D, active ragdolls, MotorJoint2D) was proposed and accepted on 2026-11-03 and built in
three phases; the proposal now lives on this page. What changed while building it:
MotorJoint2D(G9.10a):LinearVelocityis in world axes (the proposal didn’t say). The Demo’s lift feeds its target’s velocity as well as its offset, and starts at the bottom of its travel, from rest;Lift2Ddrives it, not aTween.Generic6DofJoint3D(G9.10b, ADR 0234): four constraints, not two (the data didn’t fit); speculative limits; exact Euler rate axes instead of Bullet’s; soft rows not frequency-clamped (stable at any stiffness); each body’s arm to its own anchor (the exact derivative’s blew up a flailing chain). The benchmark chain’s joints act as pins: 82 µs a step against the pins’ 57 µs (1.4×).- Active ragdolls (G9.10c, ADR 0235): defaults of 30 Hz drives and 15 Hz holds, not 10 and 4 (too soft to hold a person); at least 2 physics substeps; the Demo holds the head as well as the pelvis and pushes with 40 N·s, not 20; readbacks work at any strength (for balance detection); drives are kept awake; the one-arm check holds the forearm and hand within 10° (the upper arm is at its generic limit). Effective inertia about the joint was tried and diverged.
- Not done, as proposed:
PhysicalBone3D.JointType.SixDofand moving the hinge, slider and distance springs into the solver (the proposal’s open questions, default no).
Related
Section titled “Related”Physics · Animation · Editor · Demo · Testing · Scene graph and nodes · Networking