diff --git a/Assets/Prefabs/VehicleManager.prefab b/Assets/Prefabs/VehicleManager.prefab index 17b207b2..d924f6ee 100644 --- a/Assets/Prefabs/VehicleManager.prefab +++ b/Assets/Prefabs/VehicleManager.prefab @@ -89,6 +89,7 @@ MonoBehaviour: cameraDistanceFromVehicle: 7 rigidbodyInterpolationOnServer: 0 rigidbodyInterpolationOnClient: 1 + rigidBodyCollisionDetectionMode: 2 syncLinearVelocity: 1 syncAngularVelocity: 1 whenToDisableRigidBody: 0 diff --git a/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs b/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs index a1d649e7..3f064a69 100644 --- a/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs +++ b/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs @@ -14,6 +14,8 @@ namespace SanAndreasUnity.Behaviours.Vehicles public RigidbodyInterpolation rigidbodyInterpolationOnServer = RigidbodyInterpolation.None; public RigidbodyInterpolation rigidbodyInterpolationOnClient = RigidbodyInterpolation.None; + public CollisionDetectionMode rigidBodyCollisionDetectionMode = CollisionDetectionMode.Discrete; + public bool syncLinearVelocity = true; public bool syncAngularVelocity = true; public Utilities.WhenOnClient whenToDisableRigidBody = Utilities.WhenOnClient.OnlyOnOtherClients; diff --git a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Physics.cs b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Physics.cs index 37d1900c..e83aac46 100644 --- a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Physics.cs +++ b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Physics.cs @@ -34,6 +34,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles _rigidBody = gameObject.GetComponent(); _rigidBody.interpolation = Net.NetStatus.IsServer ? VehicleManager.Instance.rigidbodyInterpolationOnServer : VehicleManager.Instance.rigidbodyInterpolationOnClient; + _rigidBody.collisionDetectionMode = VehicleManager.Instance.rigidBodyCollisionDetectionMode; if (Net.NetStatus.IsClientOnly) {