From b5f59107a088a5abc6d6509d312c6c3c06e9195e Mon Sep 17 00:00:00 2001 From: mackierx111 Date: Fri, 18 Aug 2023 20:00:03 +0900 Subject: [PATCH] fix vehicle sleep velocity threshold --- Assets/AWSIM/Scripts/Vehicles/Vehicle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs b/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs index 4f3e698ca..abe3a7c80 100644 --- a/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs +++ b/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs @@ -335,7 +335,7 @@ bool IsEachWheelGrounded() // Is less than sleepVelocityThreshold ? bool IsCanSleepVelocity() { - if (Mathf.Abs(Velocity.z) < sleepVelocityThreshold) + if (Mathf.Abs(LocalVelocity.z) < sleepVelocityThreshold) return true; else return false;