diff --git a/Assets/Mirror/Examples/RigidbodyPhysics/Scripts/AddForce.cs b/Assets/Mirror/Examples/RigidbodyPhysics/Scripts/AddForce.cs index ccbd6d225..2242bb2c4 100644 --- a/Assets/Mirror/Examples/RigidbodyPhysics/Scripts/AddForce.cs +++ b/Assets/Mirror/Examples/RigidbodyPhysics/Scripts/AddForce.cs @@ -19,9 +19,10 @@ public override void OnStartServer() rigidbody3d.isKinematic = false; } + [ServerCallback] void Update() { - if (isServer && Input.GetKeyDown(KeyCode.Space)) + if (Input.GetKeyDown(KeyCode.Space)) rigidbody3d.AddForce(Vector3.up * force); } }