Fix debug drawing wheeled vehicle in prefab viewport

#3591
This commit is contained in:
Wojtek Figat
2025-08-29 21:03:44 +02:00
parent 5222f1d35c
commit 9fafb47abb
22 changed files with 102 additions and 100 deletions

View File

@@ -30,6 +30,7 @@
#include "Editor/Editor.h"
#include "Engine/Level/Actors/Light.h"
#include "Engine/Physics/Colliders/Collider.h"
#include "Engine/Physics/Actors/IPhysicsDebug.h"
#endif
// Debug draw service configuration
@@ -1027,11 +1028,12 @@ void DebugDraw::DrawActorsTree(Actor* actor)
#if USE_EDITOR
void DebugDraw::DrawColliderDebugPhysics(Collider* collider, RenderView& view)
void DebugDraw::DrawDebugPhysics(Actor* actor, RenderView& view)
{
if (!collider)
if (!actor || !actor->IsActiveInHierarchy())
return;
collider->DrawPhysicsDebug(view);
if (auto* physicsDebug = dynamic_cast<IPhysicsDebug*>(actor))
physicsDebug->DrawPhysicsDebug(view);
}
void DebugDraw::DrawLightDebug(Light* light, RenderView& view)