From 2147c2c34bddbd0a0ebfa165d65f8e8ead81c8ed Mon Sep 17 00:00:00 2001 From: Diren D Bharwani Date: Tue, 7 Mar 2023 05:00:43 +0800 Subject: [PATCH] Fixed capsule debug draw Height is distance between centers --- .../src/Graphics/MiddleEnd/Interface/SHDebugDrawSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHDebugDrawSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHDebugDrawSystem.cpp index 83ff2d5c..840da97d 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHDebugDrawSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHDebugDrawSystem.cpp @@ -378,7 +378,7 @@ namespace SHADE SHQuaternion circleOrientation = SHQuaternion::FromEuler(SHVec3(SHMath::DegreesToRadians(90.0), 0.0f, 0.0f)) * rotation; // Compute top and bottom of the cylinder - const SHVec3 HALF_UP = LOCAL_UP * (height * 0.5f - radius); + const SHVec3 HALF_UP = LOCAL_UP * (height * 0.5f); const SHVec3 TOP_POS = position + HALF_UP; const SHVec3 BOT_POS = position - HALF_UP;