mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-22 20:13:02 +00:00
set vehicle's rigid body CollisionDetectionMode to continuous dynamic
This commit is contained in:
parent
af54f74847
commit
3e73a557f2
3 changed files with 4 additions and 0 deletions
|
@ -89,6 +89,7 @@ MonoBehaviour:
|
|||
cameraDistanceFromVehicle: 7
|
||||
rigidbodyInterpolationOnServer: 0
|
||||
rigidbodyInterpolationOnClient: 1
|
||||
rigidBodyCollisionDetectionMode: 2
|
||||
syncLinearVelocity: 1
|
||||
syncAngularVelocity: 1
|
||||
whenToDisableRigidBody: 0
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -34,6 +34,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
_rigidBody = gameObject.GetComponent<Rigidbody>();
|
||||
|
||||
_rigidBody.interpolation = Net.NetStatus.IsServer ? VehicleManager.Instance.rigidbodyInterpolationOnServer : VehicleManager.Instance.rigidbodyInterpolationOnClient;
|
||||
_rigidBody.collisionDetectionMode = VehicleManager.Instance.rigidBodyCollisionDetectionMode;
|
||||
|
||||
if (Net.NetStatus.IsClientOnly)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue