diff options
| author | Jan Nils Ferner <contact@jnferner.com> | 2023-01-26 23:36:41 +0100 |
|---|---|---|
| committer | Jan Nils Ferner <contact@jnferner.com> | 2023-01-26 23:36:41 +0100 |
| commit | c0c8ddb9d4703158b17f93236c7368f6460faa51 (patch) | |
| tree | 33b5246a233de834d094bd4aa81c5d1a5d14bc79 | |
| parent | 6a437f47a9bc188250d9ab9d6c54a7779b8684fa (diff) | |
| download | rapier-c0c8ddb9d4703158b17f93236c7368f6460faa51.tar.gz rapier-c0c8ddb9d4703158b17f93236c7368f6460faa51.tar.bz2 rapier-c0c8ddb9d4703158b17f93236c7368f6460faa51.zip | |
Remove offset
| -rw-r--r-- | src/control/character_controller.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index d44fd2c..1108285 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -603,7 +603,7 @@ impl KinematicCharacterController { ) { let [_vertical_slope_translation, horizontal_slope_translation] = self.split_into_components(translation_remaining) - .map(|remaining| subtract_hit(remaining, &hit, 0.)); + .map(|remaining| subtract_hit(remaining, &hit, offset)); let angle_with_floor = self.up.angle(&hit.normal1); @@ -731,6 +731,6 @@ impl KinematicCharacterController { } fn subtract_hit(translation: Vector<Real>, hit: &TOI, offset: Real) -> Vector<Real> { - let hit_normal = (translation.dot(&hit.normal1) * (1.0 + offset)).min(0.0); + let hit_normal = (translation.dot(&hit.normal1) * (1.0 + 0.)).min(0.0); translation - *hit.normal1 * hit_normal } |
