diff options
| author | Jan Nils Ferner <contact@jnferner.com> | 2023-01-27 18:02:48 +0100 |
|---|---|---|
| committer | Jan Nils Ferner <contact@jnferner.com> | 2023-01-27 18:02:48 +0100 |
| commit | 0f6aa4942207d81d41462dd3e782d1f23a2a2e62 (patch) | |
| tree | aa3089d5e5a8ddc6b53074017c845efd1674a7c7 /src | |
| parent | 05db3e8e0a132ac26adbe5dc4e1573a6e7e3d557 (diff) | |
| download | rapier-0f6aa4942207d81d41462dd3e782d1f23a2a2e62.tar.gz rapier-0f6aa4942207d81d41462dd3e782d1f23a2a2e62.tar.bz2 rapier-0f6aa4942207d81d41462dd3e782d1f23a2a2e62.zip | |
Add debug prints to grounded
Diffstat (limited to 'src')
| -rw-r--r-- | src/control/character_controller.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index 6108487..21d8835 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -346,6 +346,7 @@ impl KinematicCharacterController { if snap_distance.abs() > 1.0e-5 { result.translation -= *self.up * snap_distance; } + println!("snap"); result.grounded = true; return Some((hit_handle, hit)); } @@ -413,6 +414,7 @@ impl KinematicCharacterController { let normal2 = -normal1; if normal1.dot(&self.up) <= -1.0e-5 { + println!("Grounded 1"); grounded = true; } @@ -464,6 +466,7 @@ impl KinematicCharacterController { if normal.dot(&self.up) <= -1.0e-5 { for contact in &m.points { if contact.dist <= prediction { + println!("Grounded 2"); grounded = true; return false; // We can stop the search early. } |
