aboutsummaryrefslogtreecommitdiff
path: root/src/control
diff options
context:
space:
mode:
authorJan Nils Ferner <contact@jnferner.com>2023-01-27 17:20:12 +0100
committerJan Nils Ferner <contact@jnferner.com>2023-01-27 17:20:12 +0100
commitb93c6b5766b7c74d9441038a54edbfce0a14796c (patch)
tree32217a26f08195ef815f2c4e9239b6e0c280207a /src/control
parent014bbba042e15c244cb51440c424bc19c7a05f15 (diff)
downloadrapier-b93c6b5766b7c74d9441038a54edbfce0a14796c.tar.gz
rapier-b93c6b5766b7c74d9441038a54edbfce0a14796c.tar.bz2
rapier-b93c6b5766b7c74d9441038a54edbfce0a14796c.zip
Fix missing account for offset
Diffstat (limited to 'src/control')
-rw-r--r--src/control/character_controller.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs
index 288e834..aa7a9c6 100644
--- a/src/control/character_controller.rs
+++ b/src/control/character_controller.rs
@@ -228,7 +228,7 @@ impl KinematicCharacterController {
&(Translation::from(result.translation) * character_pos),
&translation_dir,
character_shape,
- translation_dist,
+ translation_dist + offset,
false,
filter,
) {
@@ -356,7 +356,7 @@ impl KinematicCharacterController {
}
fn predict_ground(&self, up_extends: Real) -> Real {
- self.offset.eval(up_extends) * 1.3
+ self.offset.eval(up_extends) * 1.4
}
fn detect_grounded_status_and_apply_friction(