aboutsummaryrefslogtreecommitdiff
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/control')
-rw-r--r--src/control/ray_cast_vehicle_controller.rs6
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