rigid_body_sleeping
When a dynamic rigid-body doesn't move (or moves very slowly) during a few seconds, it will be marked as sleeping by the physics pipeline. Rigid-bodies marked as sleeping are no longer simulated by the physics engine until they are woken up. That way the physics engine doesn't waste any computational resources simulating objects that don't actually move. They are woken up automatically whenever another non-sleeping rigid-body starts interacting with them (either with a joint, or with one of its attached colliders generating contacts).
When using the bevy_rapier
plugin, rigid-bodies are also automatically woken up whenever one of the
components of the rigid-body is modified (to apply forces, change its position, etc.) They will not be awaken
automatically when changing the gravity though. So you may sometimes want to wake a rigid-body manually by setting
the component field Sleeping::sleeping
to true
.