Joints constrain the way two physics bodies move relative to one another. A typical use for a joint would be to
model a door hinge or a robotic arm.
Every joint requires a
Joint
Entity Component
Joint joint
Base joint connecting two bodies. By default locks relative position and orientation between constrainer and constrainee.
Schema
breakForce
Float(N)
Default:10000000000000000
Break force threshold (Newtons).
Break force threshold (Newtons).
breakTorque
Float(N·m)
Default:10000000000000000
Break torque threshold (N·m).
Break torque threshold (N·m).
constrainee
Entity Reference
Entity with a Rigid Body to be constrained.
Entity with a Rigid Body to be constrained.
constrainer
Entity Reference
Entity acting as constrainer (rigid/static) or null to constrain to world origin.
Entity acting as constrainer (rigid/static) or null to constrain to world origin.
enableCollision
Boolean
Default:false
Enable collision between constrainer and constrainee bodies.
Enable collision between constrainer and constrainee bodies.
component.
Joint component
This component specifies the base attributes needed to create a joint, such as the two physics bodies constrained by the joint: the constrainer and the constrainee entity.
The joint constrains the constrainer and constrainee's position and rotation to be dependent on one another. Further information on the specifics of the constraints in the sections below.
A joint can be broken. You can specify the maximum breaking force and torque with breakForce and breakTorque.
You can also enable or disable collision between the constrainer and the constrainee using enableCollision.
Although it depends on the use case, disabling collision is usually preferred and leads to more stable results.
To further customize the constraints of individual degrees of freedom, you can add the
Constraint
Entity Component
Constraint constraint
6‑DoF constraint built on a Joint. Defaults to fixed; selectively unlock translation and rotation on X/Y/Z and configure limits and springs.
Schema
motionLimitSpringDamping
Vector3(N·s/m)
Default:[0,0,0]
Linear limit spring damping per axis (N·s/m).
Linear limit spring damping per axis (N·s/m).
motionLimitSpringStiffness
Vector3(N/m)
Default:[0,0,0]
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
motionLowerLimit
Vector3(m)
Default:[0,0,0]
Lower linear limit per axis (meters).
Lower linear limit per axis (meters).
motionUpperLimit
Vector3(m)
Default:[0,0,0]
Upper linear limit per axis (meters).
Upper linear limit per axis (meters).
swingLimitAngle
Vector2(deg)
Default:[0,0]
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
swingSpringDamping
Float(N·m·s/rad)
Default:0
Swing limit spring damping (N·m·s/rad).
Swing limit spring damping (N·m·s/rad).
swingSpringStiffness
Float(N·m/rad)
Default:0
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
twistLimitAngle
Vector2(deg)
Default:[0,0]
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
twistSpringDamping
Float(N·m·s/rad)
Default:0
Twist limit spring damping (N·m·s/rad).
Twist limit spring damping (N·m·s/rad).
twistSpringStiffness
Float(N·m/rad)
Default:0
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
The simplest joint that can be created is a fixed joint.
If you simply attach a
Joint
Entity Component
Joint joint
Base joint connecting two bodies. By default locks relative position and orientation between constrainer and constrainee.
Schema
breakForce
Float(N)
Default:10000000000000000
Break force threshold (Newtons).
Break force threshold (Newtons).
breakTorque
Float(N·m)
Default:10000000000000000
Break torque threshold (N·m).
Break torque threshold (N·m).
constrainee
Entity Reference
Entity with a Rigid Body to be constrained.
Entity with a Rigid Body to be constrained.
constrainer
Entity Reference
Entity acting as constrainer (rigid/static) or null to constrain to world origin.
Entity acting as constrainer (rigid/static) or null to constrain to world origin.
enableCollision
Boolean
Default:false
Enable collision between constrainer and constrainee bodies.
Enable collision between constrainer and constrainee bodies.
WITHOUT a
Constraint
Entity Component
Constraint constraint
6‑DoF constraint built on a Joint. Defaults to fixed; selectively unlock translation and rotation on X/Y/Z and configure limits and springs.
Schema
motionLimitSpringDamping
Vector3(N·s/m)
Default:[0,0,0]
Linear limit spring damping per axis (N·s/m).
Linear limit spring damping per axis (N·s/m).
motionLimitSpringStiffness
Vector3(N/m)
Default:[0,0,0]
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
motionLowerLimit
Vector3(m)
Default:[0,0,0]
Lower linear limit per axis (meters).
Lower linear limit per axis (meters).
motionUpperLimit
Vector3(m)
Default:[0,0,0]
Upper linear limit per axis (meters).
Upper linear limit per axis (meters).
swingLimitAngle
Vector2(deg)
Default:[0,0]
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
swingSpringDamping
Float(N·m·s/rad)
Default:0
Swing limit spring damping (N·m·s/rad).
Swing limit spring damping (N·m·s/rad).
swingSpringStiffness
Float(N·m/rad)
Default:0
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
twistLimitAngle
Vector2(deg)
Default:[0,0]
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
twistSpringDamping
Float(N·m·s/rad)
Default:0
Twist limit spring damping (N·m·s/rad).
Twist limit spring damping (N·m·s/rad).
twistSpringStiffness
Float(N·m/rad)
Default:0
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
unlockedMotion
Unsigned Integer
Default:0
Min:0
Unlock motion along/around the specified axes.
76543210
1
Unlock motion along the X axis.
76543210
2
Unlock motion along the Y axis.
76543210
4
Unlock motion along the Z axis.
76543210
8
Unlock motion around the X axis.
76543210
16
Unlock motion around the Y axis.
76543210
32
Unlock motion around the Z axis.
Unlock motion along/around the specified axes.
, a fixed joint will be created.
A fixed joint restricts the constrainee's movement to be dependent on the constrainer. It locks the orientations and relative position of the two physics bodies.
This is somewhat similar to parenting but is implemented through physics rather than the scene graph hierarchy. You should use fixed joints to lock the movement of two physics bodies that you then want to easily break apart from each other, or to connect two physics bodies’ movement without parenting.
Base joint connecting two bodies. By default locks relative position and orientation between constrainer and constrainee.
Schema
breakForce
Float(N)
Default:10000000000000000
Break force threshold (Newtons).
Break force threshold (Newtons).
breakTorque
Float(N·m)
Default:10000000000000000
Break torque threshold (N·m).
Break torque threshold (N·m).
constrainee
Entity Reference
Entity with a Rigid Body to be constrained.
Entity with a Rigid Body to be constrained.
constrainer
Entity Reference
Entity acting as constrainer (rigid/static) or null to constrain to world origin.
Entity acting as constrainer (rigid/static) or null to constrain to world origin.
enableCollision
Boolean
Default:false
Enable collision between constrainer and constrainee bodies.
Enable collision between constrainer and constrainee bodies.
AND a
Constraint
Entity Component
Constraint constraint
6‑DoF constraint built on a Joint. Defaults to fixed; selectively unlock translation and rotation on X/Y/Z and configure limits and springs.
Schema
motionLimitSpringDamping
Vector3(N·s/m)
Default:[0,0,0]
Linear limit spring damping per axis (N·s/m).
Linear limit spring damping per axis (N·s/m).
motionLimitSpringStiffness
Vector3(N/m)
Default:[0,0,0]
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
motionLowerLimit
Vector3(m)
Default:[0,0,0]
Lower linear limit per axis (meters).
Lower linear limit per axis (meters).
motionUpperLimit
Vector3(m)
Default:[0,0,0]
Upper linear limit per axis (meters).
Upper linear limit per axis (meters).
swingLimitAngle
Vector2(deg)
Default:[0,0]
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
swingSpringDamping
Float(N·m·s/rad)
Default:0
Swing limit spring damping (N·m·s/rad).
Swing limit spring damping (N·m·s/rad).
swingSpringStiffness
Float(N·m/rad)
Default:0
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
twistLimitAngle
Vector2(deg)
Default:[0,0]
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
twistSpringDamping
Float(N·m·s/rad)
Default:0
Twist limit spring damping (N·m·s/rad).
Twist limit spring damping (N·m·s/rad).
twistSpringStiffness
Float(N·m/rad)
Default:0
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
unlockedMotion
Unsigned Integer
Default:0
Min:0
Unlock motion along/around the specified axes.
76543210
1
Unlock motion along the X axis.
76543210
2
Unlock motion along the Y axis.
76543210
4
Unlock motion along the Z axis.
76543210
8
Unlock motion around the X axis.
76543210
16
Unlock motion around the Y axis.
76543210
32
Unlock motion around the Z axis.
Unlock motion along/around the specified axes.
to an entity, a joint will be created with constraints that are configurable according to what was set in the
Constraint
Entity Component
Constraint constraint
6‑DoF constraint built on a Joint. Defaults to fixed; selectively unlock translation and rotation on X/Y/Z and configure limits and springs.
Schema
motionLimitSpringDamping
Vector3(N·s/m)
Default:[0,0,0]
Linear limit spring damping per axis (N·s/m).
Linear limit spring damping per axis (N·s/m).
motionLimitSpringStiffness
Vector3(N/m)
Default:[0,0,0]
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
motionLowerLimit
Vector3(m)
Default:[0,0,0]
Lower linear limit per axis (meters).
Lower linear limit per axis (meters).
motionUpperLimit
Vector3(m)
Default:[0,0,0]
Upper linear limit per axis (meters).
Upper linear limit per axis (meters).
swingLimitAngle
Vector2(deg)
Default:[0,0]
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
swingSpringDamping
Float(N·m·s/rad)
Default:0
Swing limit spring damping (N·m·s/rad).
Swing limit spring damping (N·m·s/rad).
swingSpringStiffness
Float(N·m/rad)
Default:0
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
twistLimitAngle
Vector2(deg)
Default:[0,0]
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
twistSpringDamping
Float(N·m·s/rad)
Default:0
Twist limit spring damping (N·m·s/rad).
Twist limit spring damping (N·m·s/rad).
twistSpringStiffness
Float(N·m/rad)
Default:0
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
unlockedMotion
Unsigned Integer
Default:0
Min:0
Unlock motion along/around the specified axes.
76543210
1
Unlock motion along the X axis.
76543210
2
Unlock motion along the Y axis.
76543210
4
Unlock motion along the Z axis.
76543210
8
Unlock motion around the X axis.
76543210
16
Unlock motion around the Y axis.
76543210
32
Unlock motion around the Z axis.
Unlock motion along/around the specified axes.
component.
Constraint component
The constraint component gives you granular control over each degree of freedom (movement along X,Y,Z and rotation around X,Y,Z). You can:
lock specific axes (no movement or rotation allowed)
free axes for unrestricted movement or rotation
limit movement or rotation within specified ranges
Use unlockedMotion to lock/unlock the degrees of freedom.
References to twist in the attributes (e.g. twistLimitAngle) refers to rotation around the X axis. Swing (e.g. swingLimitAngle) refers to rotation around the Y axis and the Z axis.
Constraint
constraint
6‑DoF constraint built on a Joint. Defaults to fixed; selectively unlock translation and rotation on X/Y/Z and configure limits and springs.
Requires
Schema
motionLimitSpringDamping
Vector3(N·s/m)
Default:[0,0,0]
Linear limit spring damping per axis (N·s/m).
Linear limit spring damping per axis (N·s/m).
motionLimitSpringStiffness
Vector3(N/m)
Default:[0,0,0]
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
Linear limit spring stiffness per axis (N/m). >0 makes the limit soft (spring‑like).
motionLowerLimit
Vector3(m)
Default:[0,0,0]
Lower linear limit per axis (meters).
Lower linear limit per axis (meters).
motionUpperLimit
Vector3(m)
Default:[0,0,0]
Upper linear limit per axis (meters).
Upper linear limit per axis (meters).
swingLimitAngle
Vector2(deg)
Default:[0,0]
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
Swing cone half‑angles about Y and Z of the constraint frame (degrees). 0 does not restrict rotation; max 180. Used if either swing axis is limited.
swingSpringDamping
Float(N·m·s/rad)
Default:0
Swing limit spring damping (N·m·s/rad).
Swing limit spring damping (N·m·s/rad).
swingSpringStiffness
Float(N·m/rad)
Default:0
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
Swing limit spring stiffness (N·m/rad). >0 makes the limit soft.
twistLimitAngle
Vector2(deg)
Default:[0,0]
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
Twist angle limits (min,max) around the twist axis (degrees). Range (−360, 360).
twistSpringDamping
Float(N·m·s/rad)
Default:0
Twist limit spring damping (N·m·s/rad).
Twist limit spring damping (N·m·s/rad).
twistSpringStiffness
Float(N·m/rad)
Default:0
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.
Twist limit spring stiffness (N·m/rad). >0 makes the limit soft.