Debug
Visualizing Sensors
Separates trigger geometry and sensor contacts from ordinary blocking bodies.
JOLT_DEBUG_SENSORS draws sensor bodies in pink. It also permits sensor events to appear in rigid-body and CharacterVirtual contact diagnostics.
Enable sensors#
jolt_debug_enable(true);
jolt_debug_set(JOLT_DEBUG_SENSORS, true);
jolt_debug_set(JOLT_DEBUG_CONTACTS, true);What is drawn#
- Every valid managed body whose native sensor state is true, using its collision geometry.
- Rigid sensor contacts in pink when CONTACTS is enabled.
- Character-to-sensor contact markers when CHARACTERS is enabled.
- Both Added and Persisted contacts; Removed contacts are omitted.
Typical trigger workflow#
trigger.set_sensor(true);
jolt_update();
jolt_debug_draw();
if (player.entered_sensor()) {
var events = player.get_sensor_enter_events();
}Collision filtering#
Debug drawing does not bypass object-layer filtering and does not create contacts. If the pink volume is visible but no contact marker appears, verify the sensor and other body layers in the collision matrix.