diff --git a/Assets/Mirror/Components/Experimental/NetworkLerpRigidbody.cs b/Assets/Mirror/Components/Experimental/NetworkLerpRigidbody.cs index 1b19ab729..adca7cbb1 100644 --- a/Assets/Mirror/Components/Experimental/NetworkLerpRigidbody.cs +++ b/Assets/Mirror/Components/Experimental/NetworkLerpRigidbody.cs @@ -38,8 +38,15 @@ public class NetworkLerpRigidbody : NetworkBehaviour protected override void OnValidate() { base.OnValidate(); + Reset(); + } + + public virtual void Reset() + { if (target == null) target = GetComponent(); + + syncDirection = SyncDirection.ClientToServer; } void Update() diff --git a/Assets/Mirror/Components/Experimental/NetworkRigidbody.cs b/Assets/Mirror/Components/Experimental/NetworkRigidbody.cs index 0c2498d7b..aa204ad33 100644 --- a/Assets/Mirror/Components/Experimental/NetworkRigidbody.cs +++ b/Assets/Mirror/Components/Experimental/NetworkRigidbody.cs @@ -42,8 +42,15 @@ public class NetworkRigidbody : NetworkBehaviour protected override void OnValidate() { base.OnValidate(); + Reset(); + } + + public virtual void Reset() + { if (target == null) target = GetComponent(); + + syncDirection = SyncDirection.ClientToServer; } #region Sync vars diff --git a/Assets/Mirror/Components/Experimental/NetworkRigidbody2D.cs b/Assets/Mirror/Components/Experimental/NetworkRigidbody2D.cs index e3bdd2992..79c07712e 100644 --- a/Assets/Mirror/Components/Experimental/NetworkRigidbody2D.cs +++ b/Assets/Mirror/Components/Experimental/NetworkRigidbody2D.cs @@ -40,8 +40,15 @@ public class NetworkRigidbody2D : NetworkBehaviour protected override void OnValidate() { base.OnValidate(); + Reset(); + } + + public virtual void Reset() + { if (target == null) target = GetComponent(); + + syncDirection = SyncDirection.ClientToServer; } #region Sync vars