From e25915b9d1b681874e07415d7c975b3be8f1bb92 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 27 Oct 2021 17:43:16 +0200 Subject: [PATCH] Fix D6Joint twist limit debug display --- Source/Engine/Physics/Joints/D6Joint.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Engine/Physics/Joints/D6Joint.cpp b/Source/Engine/Physics/Joints/D6Joint.cpp index 81a0f6527..120bc1b9a 100644 --- a/Source/Engine/Physics/Joints/D6Joint.cpp +++ b/Source/Engine/Physics/Joints/D6Joint.cpp @@ -220,9 +220,7 @@ float GetAngle(float angle, D6JointMotion motion) void D6Joint::OnDebugDrawSelected() { const Vector3 source = GetPosition(); - const Vector3 target = GetTargetPosition(); const Quaternion sourceRotation = GetOrientation(); - const Quaternion targetRotation = GetTargetOrientation(); const float swingSize = 15.0f; const float twistSize = 9.0f; const Color swingColor = Color::Green.AlphaMultiplied(0.6f); @@ -258,7 +256,7 @@ void D6Joint::OnDebugDrawSelected() // Twist is limited const float lower = _limitTwist.Lower * DegreesToRadians; const float upper = Math::Max(lower, _limitTwist.Upper * DegreesToRadians); - DEBUG_DRAW_ARC(source, sourceRotation * Quaternion::Euler(0, 0, lower), twistSize, upper - lower, twistColor, 0, false); + DEBUG_DRAW_ARC(source, sourceRotation * Quaternion::RotationYawPitchRoll(0, 0, lower), twistSize, upper - lower, twistColor, 0, false); } // Base