Files
engine/docs/zh/physics/debug.mdx
鹅叔 dc1a4793ed Docs: remove playgrounds (#2689)
* fix: doc typo
2025-05-23 17:24:53 +08:00

16 lines
807 B
Plaintext

---
order: 6
title: 物理调试
type: 物理
label: Physics
---
物理碰撞器由基础物理外形复合而成,包括了球,盒,胶囊和无限大的平面。在实际应用中,这些碰撞器外形很少与渲染的物体刚好是完全重合的,这为可视化调试带来了很大的困难。
我们提供了轻量级的[辅助线工具](https://github.com/galacean/engine-toolkit/tree/main/packages/auxiliary-lines),该工具根据物理组件的配置绘制对应的线框,辅助配置和调试物理组件。
使用起来也非常容易,只需要在挂载 `WireframeManager` 脚本,然后设置其关联各种物理组件,或者直接关联节点即可:
```typescript
const wireframe = rootEntity.addComponent(WireframeManager);
wireframe.addCollideWireframe(collider);
```