diff --git a/CHANGELOG.md b/CHANGELOG.md index 85e8e6054..3b1a2c11b 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 can now trigger with a movement orthogonal to its up vector. ## v0.19.0 (05 May 2024) diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index 87b5c1616..2c766c46e 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -368,7 +368,7 @@ impl KinematicCharacterController { result: &mut EffectiveCharacterMovement, ) -> Option<(ColliderHandle, ShapeCastHit)> { 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(