@@ -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)
|
||||
|
||||
@@ -102,11 +102,11 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
|
||||
|
||||
#if USE_EDITOR
|
||||
/// <summary>
|
||||
/// Draws the physics debug shapes for the given collider. Editor Only
|
||||
/// Draws the physics debug shapes for the given actor. Editor Only
|
||||
/// </summary>
|
||||
/// <param name="collider">The collider to draw.</param>
|
||||
/// <param name="actor">The actor to draw.</param>
|
||||
/// <param name="view">The render view to draw in.</param>
|
||||
API_FUNCTION() static void DrawColliderDebugPhysics(Collider* collider, RenderView& view);
|
||||
API_FUNCTION() static void DrawDebugPhysics(Actor* actor, RenderView& view);
|
||||
|
||||
/// <summary>
|
||||
/// Draws the light debug shapes for the given light. Editor Only
|
||||
|
||||
Reference in New Issue
Block a user