Event
sandbox:physics_process
SharedFired every fixed physics step — the update loop for physics-driven logic
Signal
"sandbox:physics_process"Arguments
| Type | Name | Description |
|---|---|---|
float | delta | Time in seconds elapsed since the last physics step |
This hook runs at a fixed rate, independent of the render framerate.
- Prefer this over
sandbox:processfor forces, velocities and any other physics-body updates. - Do not make
core.engine.draw_*calls here — usesandbox:drawfor all rendering.
Example
local body = physics.rigid.create()
util.event.on("sandbox:physics_process", function(delta)
body:apply_central_force({0, 100*delta, 0})
end)