Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

debug_colliders

The "colliders" provider for @builtin::modules.debugViz: appends one cyan wireframe per resolved physics collider shape into the shared debug-visualization batch, every edit-mode tick.

debugViz.registerProvider("colliders", require("@builtin::modules.debug_colliders").tick)

DebugViz.component registers this provider automatically — attach it to one entity to draw a wireframe around every collider in the scene alongside whatever other providers are registered.

How it works

tick(emit) queries every entity carrying a Collider, reads its resolved physics shapes via Physics.colliderShapes(entityId) (world-space pose, including auto-sized colliders), and appends the matching wireframe:

  • box — an oriented wireframe box via emit.orientedBox.
  • sphere — a 3-circle wireframe sphere via emit.wireSphere.
  • capsule — a 2-circle wireframe capsule via emit.wireCapsule.
  • convex — one line per consecutive pair in the shape's linePoints.

The core owns the anchor, material, buffers, and render feature that actually draw the batch — this module only contributes geometry.

API

  • debug_colliders.tick(emit) — append one wireframe per resolved collider shape, for every Collider in the scene, into the shared batch.