From 09f282f2fe575c9e59ffd368267a45fb9f330b35 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Wed, 9 Aug 2023 19:38:07 +0200 Subject: [PATCH] JoltPhysics3D/JoltCharacter: Fix IsOnGround returning true when touching walls --- src/Nazara/JoltPhysics3D/JoltCharacter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nazara/JoltPhysics3D/JoltCharacter.cpp b/src/Nazara/JoltPhysics3D/JoltCharacter.cpp index 140d63dea..fe4365e27 100644 --- a/src/Nazara/JoltPhysics3D/JoltCharacter.cpp +++ b/src/Nazara/JoltPhysics3D/JoltCharacter.cpp @@ -83,7 +83,7 @@ namespace Nz bool JoltCharacter::IsOnGround() const { - return m_character->IsSupported(); + return m_character->GetGroundState() == JPH::Character::EGroundState::OnGround; } void JoltCharacter::SetFriction(float friction)