Selects one of three possible rendering modes for the physics engine. This mode may be changed at any time -- see the "DebugDraw" sample project for an example of how to toggle it on the fly.
While this feature will also run on devices, it will probably be most useful in the Corona Simulator, when debugging unexpected physics engine behavior.
physics.setDrawMode( mode )
physics.setDrawMode( "debug" ) -- shows collision engine outlines only physics.setDrawMode( "hybrid" ) -- overlays collision outlines on normal Corona objects physics.setDrawMode( "normal" ) -- the default Corona renderer, with no collision outlines
Rendering modes: "debug", "hybrid", or "normal"
The physics data is displayed using color-coded vector graphics, which reflect different object types and attributes:
* Orange: dynamic physics bodies (the default body type)
* Dark blue: kinematic physics bodies
* Green: static physics bodies, such as the ground or walls
* Gray: a body that is "sleeping" due to lack of activity
* Light blue: joints
NOTE: While the physics debug draw renderer should correctly account for physics objects in nested display groups, it will display misleading results if display groups are rotated or scaled. This will be addressed in a future release.
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