Overview
Sets one of three possible "rendering modes" for the physics engine. While this feature will run on devices, it's most useful in the Corona Simulator when testing/debugging physics behavior.
In "hybrid"
or "debug"
mode, physics data is displayed using colored vector graphics which reflect different object body types and attributes. See the Physics Bodies guide for details on body types.
orange |
Dynamic physics bodies |
dark blue |
Kinematic physics bodies |
green |
Static, non-movable physics bodies |
gray |
Bodies which are "sleeping" due to lack of activity |
light blue |
Physical joints (see the Physics Joints guide) |
Gotchas
When working with Corona display groups and Box2D, it's important to remember that Box2D expects all physics objects to share a global coordinate system. Both grouped and ungrouped display objects will work well since they will share the internal coordinates of that group. However, unexpected results will occur if physical objects are added to different display groups and those groups are moved, scaled, or rotated independently of each other. As a general rule, do not alter the position, scale, or rotation of display groups that contain physics objects.