From b9e3433bc76462f7ff05a99794e57715057a51ad Mon Sep 17 00:00:00 2001 From: Chris J Date: Sun, 2 Apr 2023 15:57:04 -0500 Subject: [PATCH] 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(