feat(physics): debug-draw character controller capsule

CharacterVirtual is not a registered body, so PhysicsSystem::DrawBodies
never renders it (Jolt provides no CharacterVirtual::DebugDraw either).
Add CharacterController::DebugDraw (shape wireframe at foot-origin +
shapeOffset, green) and drive it from CollectDebugData under the
colliders bit.
This commit is contained in:
2026-10-03 19:01:57 +08:00
parent 29c413579d
commit 134812dae3
3 changed files with 27 additions and 0 deletions
@@ -59,6 +59,10 @@ namespace Engine {
const Params& GetParams() const { return m_Params; }
// 调试渲染:非 body,PhysicsSystem::DrawBodies 画不到,须手动
// (脚本在物理位姿/脚底原点处画胶囊线框)
void DebugDraw(JPH::DebugRenderer& renderer) const;
private:
Params m_Params;
JPH::Ref<JPH::CharacterVirtual> m_Character;