tags: debug title: Physics debug brief: This example allows you to toggle physics debug visualization as well as changing the time step so the simulation runs at one tenth of the speed. author: Defold Foundation scripts: physics.script, loader.script
With the physics visualization on, all collision object shapes are visible. In addition, at intersections the normals at the collision points are shown.
The example collection consists of:
go with:
physics.script included below.This collection is additionally loaded via a Collection Proxy component in main.collection. Therefore, sending message set_time_step to its url "main:/loader#physicsproxy" is causing the proxy to have a different update time, causing e.g. the slow-motion effect, which might be helpful when debugging physics.