Each assembly in the Roblox Engine corresponds to a single rigid body. The position and velocity of each rigid body describe where it's located and how fast it's moving, and one of the primary engine tasks is to update the positions and velocities of each assembly.
Assemblies can be connected together with mechanical constraints and mover constraints to form mechanisms such as cars or airplanes. As the number of assemblies and constraints in a mechanism increases, the time required to simulate the mechanism also increases. Fortunately, this increase is offset when the sleep system determines that the engine can skip simulation of non‑moving assemblies.
Sleep states
Each assembly can be in one of three states: awake, sleeping, or sleep‑checking.
Awake
An awake assembly is moving or accelerating, and is therefore simulated. Assemblies enter this state from situations outlined in sleeping and sleep‑checking, as well as additional wake situations.
Sleeping
A sleeping assembly is neither moving nor accelerating, and is therefore not simulated.
An assembly is determined to be non-moving by checking its linear velocity and rotational velocity. If its linear velocity is less than the Linear Velocity threshold and its rotational velocity is less than the Rotational Velocity threshold, the assembly is considered to be non-moving.
In some cases, simply checking for non-movement would cause an assembly to incorrectly enter the sleeping state. For example, if a ball is thrown straight up, its velocity approaches zero as it reaches its maximum height, making it a candidate to sleep and never fall back down. To handle such cases, the engine considers an assembly to be accelerating if its linear acceleration or rotational acceleration are greater than the Linear Acceleration and Rotational Acceleration thresholds, respectively, and will prevent the assembly from falling asleep.
Sleep-checking
A non-moving assembly that shares a constraint with at least one awake neighboring assembly is put into the sleep-checking state and is not simulated. On each worldstep, a sleep-checking assembly checks whether:
- Its linear acceleration is greater than the Wake Linear Acceleration threshold.
- Its rotational acceleration is greater than the Wake Rotational Acceleration threshold.
- A neighboring assembly's linear velocity is greater than the Neighbor Linear Velocity threshold.
- A neighboring assembly's rotational velocity is greater than the Neighbor Rotational Velocity threshold.
If any of these conditions is true, or under any of the additional wake situations, the sleep-checking assembly enters the awake state.
Threshold reference
The following table provides the various velocity and acceleration thresholds used to determine if an assembly is moving or accelerating.
| Threshold | Value | State change |
|---|---|---|
| Linear Velocity | 0.33 studs/s | awake ⟩ sleeping |
| Rotational Velocity | 0.42 studs/s | awake ⟩ sleeping |
| Linear Acceleration | 0.24 studs/s² | awake ⟩ sleeping |
| Rotational Acceleration | 0.24 studs/s² | awake ⟩ sleeping |
| Neighbor Linear Velocity | 0.48 studs/s | sleep-checking ⟩ awake |
| Neighbor Rotational Velocity | 0.59 studs/s | sleep-checking ⟩ awake |
| Wake Linear Acceleration | 16.9 studs/s² | awake ⟩ sleeping |
| Wake Rotational Acceleration | 16.9 studs/s² | awake ⟩ sleeping |
Rotational velocity and acceleration thresholds reflect the velocity and acceleration of a point located on the assembly bounding sphere (a sphere that contains all of the parts in an assembly) that moves rigidly with the assembly.
Actuated joints
Sometimes developers want to move parts very slowly using an actuated joint, a constraint that applies force or motion to drive connected parts, such as a HingeConstraint using a Motor. To support these scenarios, assemblies connected to actuated joints use a stricter sleep velocity threshold. This delays when those assemblies fall asleep, allowing slow, controlled motion without the physics system prematurely putting them to sleep.
The following are considered actuated joints:
| Constraint | Configuration | Required nonzero properties |
|---|---|---|
| AlignOrientation | RigidityEnabled = false | |
| AlignPosition | RigidityEnabled = false | |
| AngularVelocity | — | |
| AnimationConstraint | IsKinematic = false | |
| CylindricalConstraint | ActuatorType = Motor | |
| ActuatorType = Servo | ||
| CylindricalConstraint | AngularActuatorType = Motor | |
| AngularActuatorType = Servo | ||
| HingeConstraint | ActuatorType = Motor | |
| ActuatorType = Servo | ||
| LinearVelocity | VelocityConstraintMode = Line |
|
| VelocityConstraintMode = Plane | ||
| VelocityConstraintMode = Vector | ||
| PrismaticConstraint | ActuatorType = Motor | |
| ActuatorType = Servo | ||
| RopeConstraint | WinchEnabled = true |
Additional wake situations
In addition to situations outlined in sleep‑checking and sleeping, an assembly enters the awake state when:
It collides with another assembly moving faster than 1 studs/s.
Any physics-related property of any BasePart within the assembly changes, including:
A non-zero impulse is applied to any BasePart within the assembly via ApplyImpulse(), ApplyImpulseAtPosition(), or ApplyAngularImpulse().
Any physics-related property changes on the Workspace that would affect the assembly, including:
A new Constraint is created with an Attachment that is parented to a BasePart within the assembly.
Any property changes for a Constraint with an Attachment that is parented to a BasePart within the assembly.
The CurrentAngle property changes for a Motor that is connected to a BasePart within the assembly.
The assembly contains a VehicleSeat with a seated player character.
The assembly is within the BlastRadius of an Explosion.
Debug visualization
During playtesting, you can visualize assembly sleep states by toggling on Awake parts from the Visualization Options widget in the upper‑right corner of the 3D viewport.

Once enabled, simulated parts will be outlined by their current sleep state, with awake parts outlined in red, sleep‑checking parts outlined in orange, and sleeping parts un‑outlined.