Quick answer: Sleeping RigidBody2Ds save CPU but ignore tiny impulses. Set can_sleep = false on bodies that must always react, or call body.sleeping = false right before applying an impulse.
Here is how to fix Godot 4 RigidBody2Ds that sit motionless even when hit by other bodies. A stacked tower of crates settles down. A new crate dropped on top — nothing moves. The cause is sleep state: bodies at rest enter a low-power state that ignores all but significant interactions.
The Symptom
RigidBody2D appears unresponsive after settling. Impulses, contacts, or even direct calls to apply_impulse seem to do nothing. body.sleeping reads true.
What Causes This
Body asleep. After low-velocity time, the physics server marks the body as sleeping. Sleep skips physics integration entirely.
can_sleep enabled. Default is true. Disable for bodies that should never sleep.
Tiny impulse. Impulses below the wake threshold do not wake the body. Larger impulses or explicit wake calls are needed.
Continuous CD interaction. If the colliding body is also asleep, neither wakes the other unless one is forcibly awakened.
The Fix
Step 1: Disable sleep on critical bodies.
extends RigidBody2D
func _ready():
can_sleep = false # always run physics
Cost: more CPU per frame. Use selectively for bodies that gameplay depends on always-responding.
Step 2: Wake before impulse.
func launch(direction: Vector2, force: float):
sleeping = false
apply_central_impulse(direction * force)
Explicit wake guarantees the impulse takes effect even on a previously sleeping body.
Step 3: Use contact monitor for awake-on-touch.
contact_monitor = true
max_contacts_reported = 2
body_entered.connect(_on_body_entered)
func _on_body_entered(body):
sleeping = false
When something touches this body, wake it explicitly. Useful for trigger-based awakening.
Step 4: Verify physics layer overlap. If your impulses come from another body, ensure both share collision masks. A body that does not collide cannot apply contact-based impulse.
Step 5: Tune sleep thresholds in project settings. Open Project Settings → Physics → 2D. Sleep Threshold Linear and Sleep Threshold Angular control how slow a body must move to enter sleep. Higher values keep bodies awake longer; lower values let them sleep more aggressively.
Performance Tradeoff
Sleep saves CPU. A scene with hundreds of crates that have settled costs nearly zero physics time when all are asleep. Disable sleep only on bodies that gameplay depends on always-active.
“Sleep is a savings. Wake explicitly when interactivity demands it. can_sleep=false is the always-awake escape hatch.”
Related Issues
For CharacterBody3D velocity issues, see CharacterBody3D Velocity. For 2D ghost collisions, see CharacterBody2D Ghost Collision.
can_sleep=false for crucial bodies. Wake before impulse. Sleep thresholds for fine tuning.