Skip to content

Commit

Permalink
Use the absolute value of the up attribute when calculating side_extent
Browse files Browse the repository at this point in the history
  • Loading branch information
Linentio committed Sep 30, 2023
1 parent fa2be3f commit 6c901d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/control/character_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ impl KinematicCharacterController {
fn compute_dims(&self, character_shape: &dyn Shape) -> Vector2<Real> {
let extents = character_shape.compute_local_aabb().extents();
let up_extent = extents.dot(&self.up.abs());
let side_extent = (extents - *self.up * up_extent).norm();
let side_extent = (extents - (*self.up).abs() * up_extent).norm();
Vector2::new(side_extent, up_extent)
}

Expand Down

0 comments on commit 6c901d5

Please sign in to comment.