From b69c9c48135aafd5daf27e4ca9044048b42a5bc4 Mon Sep 17 00:00:00 2001 From: Jan Nils Ferner Date: Thu, 26 Jan 2023 23:27:16 +0100 Subject: Increase prediction threshold --- src/control/character_controller.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index b7d0503..de62011 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -365,7 +365,7 @@ impl KinematicCharacterController { mut kinematic_friction_translation: Option<&mut Vector>, mut translation_remaining: Option<&mut Vector>, ) -> bool { - let prediction = self.offset.eval(dims.y) * 1.1; + let prediction = self.offset.eval(dims.y) * 1.2; // TODO: allow custom dispatchers. let dispatcher = DefaultQueryDispatcher; @@ -628,7 +628,7 @@ impl KinematicCharacterController { false, filter, ) - .map(|hit| hit.1.toi) + .map(|hit| hit.1.toi + offset) .unwrap_or(max_height); // Remove the step height from the vertical part of the self. @@ -664,7 +664,7 @@ impl KinematicCharacterController { let up_extent = extents.dot(&self.up); let movement_to_transfer = *collision.toi.normal1 * collision.translation_remaining.dot(&collision.toi.normal1); - let prediction = self.offset.eval(up_extent) * 1.1; + let prediction = self.offset.eval(up_extent) * 1.2; // TODO: allow custom dispatchers. let dispatcher = DefaultQueryDispatcher; -- cgit