From 9674f276d3a363ca32181fefccfa9711d0787192 Mon Sep 17 00:00:00 2001 From: TalkingWallnut <62713831+TalkingWallnut@users.noreply.github.com> Date: Sat, 23 Jan 2021 15:56:18 +0100 Subject: [PATCH] Fixed the issue when slope limit was set to 90 degrees flax crashed. I fixed the issue when slope limit was set to 90 degrees flax would commit suicide (crash) (: . I just changed the clamp limit from 90 to 89 degrees. --- Source/Engine/Physics/Colliders/CharacterController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Physics/Colliders/CharacterController.cpp b/Source/Engine/Physics/Colliders/CharacterController.cpp index 6c75879ad..42c316a55 100644 --- a/Source/Engine/Physics/Colliders/CharacterController.cpp +++ b/Source/Engine/Physics/Colliders/CharacterController.cpp @@ -55,7 +55,7 @@ void CharacterController::SetHeight(const float value) void CharacterController::SetSlopeLimit(float value) { - value = Math::Clamp(value, 0.0f, 90.0f); + value = Math::Clamp(value, 0.0f, 89.0f); if (Math::NearEqual(value, _slopeLimit)) return;