diff --git a/TombEngine/Game/collision/collide_item.cpp b/TombEngine/Game/collision/collide_item.cpp index 58170d86d..844a1760d 100644 --- a/TombEngine/Game/collision/collide_item.cpp +++ b/TombEngine/Game/collision/collide_item.cpp @@ -331,9 +331,27 @@ void TestForObjectOnLedge(ItemInfo* item, CollisionInfo* coll) bool TestLaraPosition(const ObjectCollisionBounds& bounds, ItemInfo* item, ItemInfo* laraItem) { + constexpr auto DEBUG_BOX_COLOR = Color(1.0f, 0.0f, 0.0f); + + // Draw oriented debug interaction box. if (DebugMode) { - DrawDebugBox(bounds.BoundingBox.ToBoundingOrientedBox(item->Pose), Color(1.0f, 0.0f, 0.0f), RendererDebugPage::CollisionStats); + auto obb = bounds.BoundingBox.ToBoundingOrientedBox(item->Pose); + auto rotMatrix = item->Pose.Orientation.ToRotationMatrix(); + + DrawDebugBox(obb, DEBUG_BOX_COLOR, RendererDebugPage::CollisionStats); + DrawDebugLine( + obb.Center + Vector3::Transform(Vector3(0.0f, -obb.Extents.y, 0.0f), rotMatrix), + obb.Center + Vector3::Transform(Vector3(0.0f, -obb.Extents.y, obb.Extents.z), rotMatrix), + DEBUG_BOX_COLOR, RendererDebugPage::CollisionStats); + DrawDebugLine( + obb.Center + Vector3::Transform(Vector3(0.0f, -obb.Extents.y, obb.Extents.z), rotMatrix), + obb.Center + Vector3::Transform(Vector3(0.0f, obb.Extents.y, obb.Extents.z), rotMatrix), + DEBUG_BOX_COLOR, RendererDebugPage::CollisionStats); + DrawDebugLine( + obb.Center + Vector3::Transform(Vector3(0.0f, obb.Extents.y, 0.0f), rotMatrix), + obb.Center + Vector3::Transform(Vector3(0.0f, obb.Extents.y, obb.Extents.z), rotMatrix), + DEBUG_BOX_COLOR, RendererDebugPage::CollisionStats); } auto deltaOrient = laraItem->Pose.Orientation - item->Pose.Orientation; diff --git a/TombEngine/Renderer/ShaderManager/ShaderManager.cpp b/TombEngine/Renderer/ShaderManager/ShaderManager.cpp index 3dd246748..d793f4614 100644 --- a/TombEngine/Renderer/ShaderManager/ShaderManager.cpp +++ b/TombEngine/Renderer/ShaderManager/ShaderManager.cpp @@ -5,10 +5,10 @@ #include "Renderer/Structures/RendererShader.h" #include "Specific/configuration.h" #include "Specific/trutils.h" -#include "version.h" +#include "Version.h" -using namespace TEN::Utils; using namespace TEN::Renderer::Structures; +using namespace TEN::Utils; namespace TEN::Renderer::Utils {