physics.stop()

Type Function
Library physics.*
Return value Boolean
Revision Release 2024.3703
Keywords physics, stop, stop physics
See also physics.start()
physics.pause()

Overview

Stops the physics engine. This function will return false and display a warning message if the API cannot be processed.

Gotchas

Syntax

physics.stop()

Example

local physics = require( "physics" )

-- Start the physics engine
physics.start()

-- Stop the physics simulation after 2 seconds
timer.performWithDelay( 2000, function()
    physics.stop()
end )