added ServerCallback

This commit is contained in:
MrGadget1024 2021-11-25 04:04:14 -05:00
parent f1d26e7b73
commit c8d97b9063

View File

@ -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);
}
}