Event

sandbox:physics_process

Shared

Fired every fixed physics step — the update loop for physics-driven logic

Signal

"sandbox:physics_process"

Arguments

TypeNameDescription
floatdeltaTime in seconds elapsed since the last physics step

This hook runs at a fixed rate, independent of the render framerate.

  • Prefer this over sandbox:process for forces, velocities and any other physics-body updates.
  • Do not make core.engine.draw_* calls here — use sandbox:draw for all rendering.

Example

Apply a force every physics step
local body = physics.rigid.create()

util.event.on("sandbox:physics_process", function(delta)
    body:apply_central_force({0, 100*delta, 0})
end)

On this page