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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user