diff options
| author | Jan Nils Ferner <contact@jnferner.com> | 2023-01-26 23:02:36 +0100 |
|---|---|---|
| committer | Jan Nils Ferner <contact@jnferner.com> | 2023-01-26 23:02:36 +0100 |
| commit | c3b0bde6b229304949255a33ceda838983570f72 (patch) | |
| tree | 2db5349998afed17271d3d3d5aa1e80aa2444b6b /src | |
| parent | d5946f623bef8b158e113f84701e448b07ae75b7 (diff) | |
| download | rapier-c3b0bde6b229304949255a33ceda838983570f72.tar.gz rapier-c3b0bde6b229304949255a33ceda838983570f72.tar.bz2 rapier-c3b0bde6b229304949255a33ceda838983570f72.zip | |
Fix offset being gone after snapping to ground
Diffstat (limited to 'src')
| -rw-r--r-- | src/control/character_controller.rs | 2 |
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)); } |
