Files
GDevelop/GDJS/Runtime
Aurélien Vivet c8f55dd99a feat(gdjs): render 3D collision wireframes in the debugger renderer
Implement `renderDebugDraw3D` and `clearDebugDraw3D` on
DebuggerPixiRenderer. Wireframes are rendered as THREE.js meshes
attached to each object's 3D renderer object.

Supports the four Physics3D primitive shapes (Box, Sphere, Capsule,
Cylinder) including orientation (X/Y/Z), shape offsets, parent-scale
compensation, and the PhysicsCharacter3D bottom-origin adjustment.

Also supports the Mesh shape: each child mesh of the object's 3D
renderer is wrapped with a `THREE.WireframeGeometry` + LineSegments.
Async-loaded Model3D meshes are picked up automatically each frame,
and detached source meshes are pruned.

State is tracked in a `Map<RuntimeObject, DebugDraw3DState>` on the
renderer, with a per-frame `seen` set that disposes wireframes whose
owning object disappeared. CustomRuntimeObject children are visited
recursively so nested Physics3D objects are covered.

Wireframes opt out of raycasting (`mesh.raycast = () => {}`) so that
the community Raycaster3D extension doesn't crash on intersections
without normals.
2026-05-13 22:19:03 +02:00
..