mirror of
https://github.com/galacean/engine.git
synced 2026-05-23 01:40:11 +08:00
1.3 KiB
1.3 KiB
order, title, type, label
| order | title | type | label |
|---|---|---|---|
| 6 | Physical Debugging | Physical | Physics |
Physical colliders are composed of basic physical shapes, including spheres, boxes, capsules, and infinite planes. In practical applications, these collider shapes rarely perfectly align with the rendered objects, making visualization debugging quite challenging. There are two debugging methods:
- Using PhysX Visual Debugger (PVD), an official debugging tool developed by Nvidia. However, using this tool requires compiling the debug version of PhysX on your own and connecting the browser to the debugging tool via WebSocket. For specific usage instructions, refer to the introduction in the physx.js Readme.
- We also provide a lightweight auxiliary line tool, which draws wireframes based on the configuration of physical components to assist in configuring and debugging physical components.
It is easy to use, simply attach the
WireframeManagerscript and then associate it with various physical components, or directly link nodes like this:
const wireframe = rootEntity.addComponent(WireframeManager);
wireframe.addCollideWireframe(collider);