From c3b0bde6b229304949255a33ceda838983570f72 Mon Sep 17 00:00:00 2001 From: Jan Nils Ferner Date: Thu, 26 Jan 2023 23:02:36 +0100 Subject: Fix offset being gone after snapping to ground --- src/control/character_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index 1007f1d..6c2d89f 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -342,7 +342,7 @@ impl KinematicCharacterController { filter, ) { // Apply the snap. - result.translation -= *self.up * (hit.toi - offset).max(0.0); + result.translation -= *self.up * (hit.toi - offset); result.grounded = true; return Some((hit_handle, hit)); } -- cgit