Debug
Constraints
Visualizes managed constraint frames, limits, motors, paths, and collision-disabled pairs.
JOLT_DEBUG_CONSTRAINTS uses the current managed JoltConstraint registry and native runtime getters. Invalid constraints are skipped safely.
Enable constraints#
jolt_debug_enable(true);
jolt_debug_set(JOLT_DEBUG_CONSTRAINTS, true);Constraint diagnostics#
| Type | Drawing |
|---|---|
| Fixed | Purple connection and midpoint marker. |
| Point | Both body links and the shared pink anchor. |
| Distance | Connection or blue zigzag spring plus endpoint markers. |
| Hinge | Anchor, axis, reference, limit arc, current-angle ray, and green motor marker. |
| Cone | Cone boundary, reference axis, and current direction coloured by limit state. |
| Slider | Axis, clamped visual limits, current position, and optional motor target. |
| Path | Sampled curve, control points, tangent/normal/binormal frame, attached body, direction, and motor target. |
Collision disabled#
A red cross at the pair midpoint indicates that get_collision_enabled() is false. Multiple disabled constraints for one body pair are reference-counted by the physics layer; the marker reflects the individual constraint setting.
Path colours#
- Cyan curve segments.
- Orange tangent, green normal, and pink binormal samples.
- Purple control points; green start and red end on open paths.
- Green attached-body marker and direction.
- Yellow position-motor target.