Physical colliders are composed of basic physical shapes, including spheres, boxes, capsules, and infinite planes. In practical applications, these collider shapes rarely align perfectly with the rendered objects, which creates significant challenges for visual debugging.
We provide a lightweight auxiliary lines tool, which draws wireframes according to the physics component configuration to assist in configuring and debugging physics components.
It's very easy to use - just mount the WireframeManager
script and set its association with various physics components, or directly associate it with nodes:
const wireframe = rootEntity.addComponent(WireframeManager);
wireframe.addCollideWireframe(collider);