Quick answer: Godot 4 RigidBody2D never sleeping despite stationary state? Sleep threshold defaults are too loose - tune linear/angular thresholds via PhysicsServer2D.
100 dropped items in a level. Each is a RigidBody2D; collectively 8% CPU on physics for objects that aren't moving.
Tighten sleep thresholds
PhysicsServer2D.body_set_param(
rid, BODY_PARAM_LINEAR_DAMP, 2.0)Higher damping pushes velocity below the sleep threshold faster.
Set can_sleep
Per body, can_sleep = true. Default but worth confirming - some imports override it.
Force sleep on settle
Custom logic: after the body's velocity has been < epsilon for 1 second, sleeping = true. Engine-level sleep is opinionated; manual override is reliable.
“Physics sleep is a heuristic. Heuristics need tuning for your scale.”
Profile physics cost in the worst-case scenario (100+ bodies, dense scene). Sleep tuning pays back at this scale; not at the dev test scale.