mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
don't use gravity and don't detect collisions on client
This commit is contained in:
parent
9caf2df790
commit
91bc7547a5
1 changed files with 7 additions and 0 deletions
|
@ -34,6 +34,13 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
_rigidBody = gameObject.GetComponent<Rigidbody>();
|
||||
|
||||
_rigidBody.interpolation = Net.NetStatus.IsServer ? VehicleManager.Instance.rigidbodyInterpolationOnServer : VehicleManager.Instance.rigidbodyInterpolationOnClient;
|
||||
|
||||
if (Net.NetStatus.IsClientOnly)
|
||||
{
|
||||
_rigidBody.useGravity = false;
|
||||
_rigidBody.detectCollisions = false;
|
||||
}
|
||||
|
||||
HandlingData = Handling.Get<Handling.Car>(Definition.HandlingName);
|
||||
|
||||
VConsts.Changed += UpdateValues;
|
||||
|
|
Loading…
Reference in a new issue