diff options
| author | Sébastien Crozet <developer@crozet.re> | 2023-03-25 18:37:04 +0100 |
|---|---|---|
| committer | Sébastien Crozet <developer@crozet.re> | 2023-03-25 18:37:04 +0100 |
| commit | afe4e4d53d0ab15aff0830cd14bb77b71a112208 (patch) | |
| tree | 1fd77da5b20c2ec1add9ec0217e801d73eda27d5 | |
| parent | 8aafd5d0bbde4999579e6bd12cc634919b394fee (diff) | |
| download | rapier-afe4e4d53d0ab15aff0830cd14bb77b71a112208.tar.gz rapier-afe4e4d53d0ab15aff0830cd14bb77b71a112208.tar.bz2 rapier-afe4e4d53d0ab15aff0830cd14bb77b71a112208.zip | |
cargo fmt
| -rw-r--r-- | src/control/character_controller.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index 695d811..a5bcf3d 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -261,7 +261,8 @@ impl KinematicCharacterController { &mut result, ) { // No stairs, try to move along slopes. - translation_remaining = self.handle_slopes(&toi, &translation_remaining, &mut result); + translation_remaining = + self.handle_slopes(&toi, &translation_remaining, &mut result); } } else { // No interference along the path. @@ -475,7 +476,12 @@ impl KinematicCharacterController { false } - fn handle_slopes(&self, hit: &TOI, translation_remaining: &Vector<Real>, result: &mut EffectiveCharacterMovement) -> Vector<Real> { + fn handle_slopes( + &self, + hit: &TOI, + translation_remaining: &Vector<Real>, + result: &mut EffectiveCharacterMovement, + ) -> Vector<Real> { let [vertical_translation, horizontal_translation] = self.split_into_components(translation_remaining); let slope_translation = subtract_hit(*translation_remaining, hit); |
