Add Physics Colliders debug view mode to display physical world shapes (solid)
This commit is contained in:
@@ -86,10 +86,14 @@ bool SplineCollider::CanBeTrigger() const
|
||||
#if USE_EDITOR
|
||||
|
||||
#include "Engine/Debug/DebugDraw.h"
|
||||
#include "Engine/Graphics/RenderView.h"
|
||||
|
||||
void SplineCollider::DrawPhysicsDebug(RenderView& view)
|
||||
{
|
||||
DEBUG_DRAW_WIRE_TRIANGLES_EX(_vertexBuffer, _indexBuffer, Color::GreenYellow * 0.8f, 0, true);
|
||||
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
|
||||
DebugDraw::DrawTriangles(_vertexBuffer, _indexBuffer, Color::CornflowerBlue, 0, true);
|
||||
else
|
||||
DebugDraw::DrawWireTriangles(_vertexBuffer, _indexBuffer, Color::GreenYellow * 0.8f, 0, true);
|
||||
}
|
||||
|
||||
void SplineCollider::OnDebugDrawSelected()
|
||||
|
||||
Reference in New Issue
Block a user