diff options
| author | Thierry Berger <contact@thierryberger.com> | 2024-06-03 15:20:24 +0200 |
|---|---|---|
| committer | Thierry Berger <contact@thierryberger.com> | 2024-06-03 15:20:24 +0200 |
| commit | e1ed90603e618e28f48916690d761e0d8213e2ad (patch) | |
| tree | 8399da9825ca9ee8edd601b1265e818fa303b541 /src/control/ray_cast_vehicle_controller.rs | |
| parent | fe336b9b98d5825544ad3a153a84cb59dc9171c6 (diff) | |
| parent | 856675032e76b6eb4bc9e0be4dc87abdbcfe0421 (diff) | |
| download | rapier-e1ed90603e618e28f48916690d761e0d8213e2ad.tar.gz rapier-e1ed90603e618e28f48916690d761e0d8213e2ad.tar.bz2 rapier-e1ed90603e618e28f48916690d761e0d8213e2ad.zip | |
Merge branch 'master' into collider-builder-debug
Diffstat (limited to 'src/control/ray_cast_vehicle_controller.rs')
| -rw-r--r-- | src/control/ray_cast_vehicle_controller.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/control/ray_cast_vehicle_controller.rs b/src/control/ray_cast_vehicle_controller.rs index 00b11eb..98b6339 100644 --- a/src/control/ray_cast_vehicle_controller.rs +++ b/src/control/ray_cast_vehicle_controller.rs @@ -341,7 +341,7 @@ impl DynamicRayCastVehicleController { wheel.raycast_info.ground_object = None; if let Some((collider_hit, mut hit)) = hit { - if hit.toi == 0.0 { + if hit.time_of_impact == 0.0 { let collider = &colliders[collider_hit]; let up_ray = Ray::new(source + rayvector, -rayvector); if let Some(hit2) = @@ -362,7 +362,7 @@ impl DynamicRayCastVehicleController { wheel.raycast_info.is_in_contact = true; wheel.raycast_info.ground_object = Some(collider_hit); - let hit_distance = hit.toi * raylen; + let hit_distance = hit.time_of_impact * raylen; wheel.raycast_info.suspension_length = hit_distance - wheel.radius; // clamp on max suspension travel @@ -372,7 +372,7 @@ impl DynamicRayCastVehicleController { .raycast_info .suspension_length .clamp(min_suspension_length, max_suspension_length); - wheel.raycast_info.contact_point_ws = ray.point_at(hit.toi); + wheel.raycast_info.contact_point_ws = ray.point_at(hit.time_of_impact); let denominator = wheel .raycast_info |
