Debug
Shapes
Draws managed collision geometry and distinguishes body motion states by colour.
JOLT_DEBUG_SHAPES draws non-sensor body wireframes from the high-level geometry metadata. Sensor geometry is deliberately controlled by JOLT_DEBUG_SENSORS instead.
Enable shape drawing#
jolt_debug_enable(true);
jolt_debug_set(JOLT_DEBUG_SHAPES, true);Body colours#
| Body state | Colour |
|---|---|
| Dynamic and active | Cyan blue |
| Dynamic and sleeping | Dark blue |
| Kinematic | Orange |
| Static | Grey |
| Sensor | Pink; requires JOLT_DEBUG_SENSORS |
Supported geometry#
- Box, Sphere, Capsule, Cylinder, Tapered Capsule, and Tapered Cylinder.
- Plane as a finite diagnostic grid capped to a half extent of 10.
- Convex point connections, limited to the first 64 stored points.
- Mesh triangle edges, sampled down to at most approximately 2048 drawn triangles.
- HeightField grid, sampled with a stride that caps either dimension near 128.
- Compound shapes with each child transformed from compound-local into world space.
Center of mass#
jolt_debug_set(JOLT_DEBUG_CENTER_OF_MASS, true);The actual world-space center of mass is a yellow marker. An orange segment connects the public body origin to it. This flag works independently of SHAPES and is included in JOLT_DEBUG_ALL.