Type Boolean Object Body Library physics.* Revision 2019.3470 Keywords body, isBodyActive See also object.isAwake
Used to set or get the body's current active state. Inactive bodies are not destroyed but they are removed from the physics simulation and cease to interact with other bodies.
If this property is set to
false on an active object currently in collision state with another, a collision with a phase of
"ended" will immediately be triggered. Likewise, if this property is set to
true on an inactive object currently in collision state with another, a collision with a phase of
"began" will immediately be triggered.
-- 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 active state myRect.isBodyActive = false