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