aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Nils Ferner <contact@jnferner.com>2023-01-26 23:02:36 +0100
committerJan Nils Ferner <contact@jnferner.com>2023-01-26 23:02:36 +0100
commitc3b0bde6b229304949255a33ceda838983570f72 (patch)
tree2db5349998afed17271d3d3d5aa1e80aa2444b6b
parentd5946f623bef8b158e113f84701e448b07ae75b7 (diff)
downloadrapier-c3b0bde6b229304949255a33ceda838983570f72.tar.gz
rapier-c3b0bde6b229304949255a33ceda838983570f72.tar.bz2
rapier-c3b0bde6b229304949255a33ceda838983570f72.zip
Fix offset being gone after snapping to ground
-rw-r--r--src/control/character_controller.rs2
1 files changed, 1 insertions, 1 deletions
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));
}