Module sleeping

Source
Expand description

Manages sleeping and waking for bodies, automatically deactivating them to save computational resources.

See SleepingPlugin.

Structs§

DeactivationTime
How long in seconds the linear and angular velocity of a body need to be below the SleepingThreshold before the body is deactivated. Defaults to 1 second.
SleepingPlugin
Manages sleeping and waking for bodies, automatically deactivating them to save computational resources.
SleepingThreshold
A threshold that indicates the maximum linear and angular velocity allowed for a body to be deactivated.
WakeUpBody
A Command that wakes up a rigid body by removing the Sleeping component and resetting the TimeSleeping to zero.

Functions§

mark_sleeping_bodies
Adds the Sleeping component to bodies whose linear and anigular velocities have been under the SleepingThreshold for a duration indicated by DeactivationTime.