This commit is contained in:
Isuru Samarathunga
2025-09-29 19:04:14 +05:30
parent ae20f51e9a
commit 0d5c2e639e

View File

@ -17,6 +17,8 @@
#include <IAEngine/IAEngine.hpp>
#include <IAEngine/Physics/Physics.hpp>
#include <IAEngine/Rendering/DebugDraw.hpp>
#include <IAEngine/Rendering/Camera.hpp>
#include <IAEngine/Rendering/Renderer.hpp>
#include <IAEngine/Nodes/Node.hpp>
@ -52,7 +54,7 @@ namespace ia::iae
auto color = glm::vec4{0.75f, 0.0f, 0.0f, 1.0f};
if(c.IsTrigger)
color = {0.25f, 0.45f, 0.75f, 0.75f};
DebugDraw::DrawRect(t->GetNode()->GetPosition() + c.Position, c.Size, color, 2.0f);
DebugDraw::DrawRect(t->GetNode()->GetPosition() + c.Position - Renderer::GetCamera()->Position(), c.Size, color, 2.0f);
}
}
}