Type Boolean Object Body Library physics.* Revision Current Public Release (2017.3184) Keywords body, isAwake See also object.isBodyActive object.isSleepingAllowed
A boolean for the body's current "awake" state. By default, all bodies automatically "sleep" when nothing interacts with them for a couple of seconds. At this point, they stop being simulated until something like a collision wakes them up. The
isAwake property can either fetch a body's current state or forcibly wake it up.
-- Create a rectangle local myRect = display.newRect( 0, 0, 100, 100 ) -- Add a body to the rectangle physics.addBody( myRect, "dynamic" ) -- Set the rectangle's "awake" state to true myRect.isAwake = true