A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2014.2483 | Released: 31 Oct 2014, 1:37am | What's New | Download Now



This function start the physics simulation and should be called before any other physics functions.

By default, Box2D bodies not involved in a collision will "sleep" after a couple of seconds. This reduces overhead, but in some cases you may not want this behavior. For example, the "ShapeTumbler" sample code will not work well if bodies are allowed to sleep, since sleeping bodies do not respond to changes in the direction of gravity.

You can override this behavior on a given body with body.isSleepingAllowed = false, but you can also override this globally for all bodies in the world by using an optional boolean parameter in start:


physics.start( noSleep )


physics.start( true ) -- starts the Physics engine and prevents all bodies from sleeping


true prevent all bodies from sleeping.
false allows all bodies to sleep (default mode).




require( "physics" ) and physics.start() must be at the top of the main.lua file.

Supported on operating systems and platforms for build numbers shown:
  • Mac OS X:
    Corona SDK 2.0
  • Windows:
    Corona SDK 2.0
  • iOS:
    Corona SDK 2.0
  • Android:
    Corona SDK 2.0