Files
engine/docs/en/physics/debug.mdx
luzhuang f6b696583e Doc: opt physics doc (#2551)
* feat: opt physics doc
2025-03-07 16:41:40 +08:00

17 lines
928 B
Plaintext

---
order: 6
title: Physics Debug
type: Physics
label: Physics
---
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](https://github.com/galacean/engine-toolkit/tree/main/packages/auxiliary-lines), 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:
```typescript
const wireframe = rootEntity.addComponent(WireframeManager);
wireframe.addCollideWireframe(collider);
```
<Playground href="/embed/physics-debug-draw" />