Overview
Joints connect two physics bodies together or constrain a single body relative to a point in space. Godot provides various joint types for different mechanical behaviors.Joint basics
All joints share common properties:Joints bind two physics bodies together. At least one of the bodies must be dynamic (RigidBody) for the joint to have any effect.
2D joints
PinJoint2D
Connects two bodies at a single point, allowing rotation.- Pendulums
- Ragdoll joints
- Chains and ropes
GrooveJoint2D
Constrains one body to move along a groove (line) relative to another.- Sliding doors
- Elevator platforms
- Linear motion constraints
DampedSpringJoint2D
A spring joint with damping, creating elastic connections.- Suspension systems
- Elastic ropes
- Springy platforms
- Soft body simulation
3D joints
PinJoint3D
Connects two bodies at a point with configurable constraints.HingeJoint3D
A rotating hinge joint around a single axis.- Doors
- Wheels
- Levers
- Mechanical arms
Hinge parameters
Hinge parameters
PARAM_BIAS: Constraint correction speedPARAM_LIMIT_UPPER: Maximum anglePARAM_LIMIT_LOWER: Minimum anglePARAM_LIMIT_BIAS: Limit correction speedPARAM_LIMIT_SOFTNESS: Limit softnessPARAM_LIMIT_RELAXATION: Limit relaxationPARAM_MOTOR_TARGET_VELOCITY: Motor speedPARAM_MOTOR_MAX_IMPULSE: Motor strength
SliderJoint3D
Allows linear and angular motion along one axis.- Sliding doors
- Drawer mechanics
- Telescoping mechanisms
- Piston motion
ConeTwistJoint3D
A ball-and-socket joint with cone angle limits.- Ragdoll shoulders
- Ball joints
- Gimbal systems
- Character limbs
Generic6DOFJoint3D
A highly configurable joint with 6 degrees of freedom (3 linear, 3 angular).- Complex mechanical systems
- Custom constraints
- Advanced ragdoll joints
- Robotic joints
Joint configuration
Bias parameter
Controls how quickly the joint corrects constraint violations:Disable collision
Prevent connected bodies from colliding:Breaking joints
Joints can’t be broken by default. Implement custom breaking:Common patterns
Chain simulation
Suspension system
Ragdoll creation
Debugging joints
Visualize joints in the editor:- Select the joint node
- The joint will be displayed with debug gizmos
- Adjust the position to align bodies correctly
Performance considerations
Minimize joint count
Each joint adds computational cost. Use the minimum number needed.
Use appropriate joint types
Simpler joints (pin, hinge) are faster than complex ones (Generic6DOF).
Adjust solver iterations
Increase solver iterations in project settings for more stable joints at the cost of performance.
Put jointed bodies to sleep
Connected bodies automatically sleep when stationary, improving performance.
Next steps
Physics introduction
Learn about physics fundamentals
Collision shapes
Understand collision shape types