Type Function
Library physics.*
Return value none
Revision Release 2023.3686
Keywords physics, frame-based physics, time-based physics, time scale
See also physics.setScale()


Specifies either a frame-based (approximated) physics simulation or a time-based simulation.


physics.setTimeStep( dt )
dt (required)

Number. Value of physics "time step" in seconds, meaning the time between each physics update in seconds.

  • Use 0 to get an approximate time-based physics simulation.
  • Use -1 to get default behavior (frame-based).
  • Use 1/30 for 30 updates per second.
  • Use 1/60 for 60 updates per second.


physics.setTimeStep( 0 )  -- Time-based physics simulation