From b9e3433bc76462f7ff05a99794e57715057a51ad Mon Sep 17 00:00:00 2001 From: Chris J Date: Sun, 2 Apr 2023 15:57:04 -0500 Subject: [PATCH 1/4] should allow grounding with no up movement --- src/control/character_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index a5bcf3d75..50e67b42b 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -318,7 +318,7 @@ impl KinematicCharacterController { result: &mut EffectiveCharacterMovement, ) -> Option<(ColliderHandle, TOI)> { if let Some(snap_distance) = self.snap_to_ground { - if result.translation.dot(&self.up) < -1.0e-5 { + if result.translation.dot(&self.up) <= 0.0 { let snap_distance = snap_distance.eval(dims.y); let offset = self.offset.eval(dims.y); if let Some((hit_handle, hit)) = queries.cast_shape( From 565174af42fc053796bda8bda85252ff2d242e7f Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Fri, 7 Jun 2024 11:00:51 +0200 Subject: [PATCH 2/4] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85e8e6054..577341ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ to propagate it to the multibody). - Remove an internal special-case for contact constraints on fast contacts. The doesn’t seem necessary with the substep solver. +- Character controller's snap to ground now triggers with a movement orthogonal to the up vector. ## v0.19.0 (05 May 2024) From aace7f421f0f3cb409a02fde2710449927afdd4b Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Fri, 7 Jun 2024 11:02:59 +0200 Subject: [PATCH 3/4] fix changelog wording --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 577341ff2..54f86583e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,7 @@ to propagate it to the multibody). - Remove an internal special-case for contact constraints on fast contacts. The doesn’t seem necessary with the substep solver. -- Character controller's snap to ground now triggers with a movement orthogonal to the up vector. +- Character controller's snap to ground can now trigger with a movement orthogonal to the up vector. ## v0.19.0 (05 May 2024) From 20cb15ce964ded86e54336eb47b6c329b7b061f7 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Fri, 7 Jun 2024 11:03:42 +0200 Subject: [PATCH 4/4] fix changelog wording --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54f86583e..3b1a2c11b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,7 @@ to propagate it to the multibody). - Remove an internal special-case for contact constraints on fast contacts. The doesn’t seem necessary with the substep solver. -- Character controller's snap to ground can now trigger with a movement orthogonal to the up vector. +- Character controller's snap to ground can now trigger with a movement orthogonal to its up vector. ## v0.19.0 (05 May 2024)