Beispiel #1
0
    void RpcSyncUnitRotation(NetworkIdentity mover, Quaternion newRot, float newRotVel)
    {
        if (mover == null)
        {
            Debug.LogWarning("[SyncUnitRotation] Can't find unit which was supposed to rotate.");
            return;
        }

        //Debug.Log("Synced " + mover.name);
        UnitMovement um = mover.GetComponent <Unit>().GetMovement();

        um.SyncRotAndRotVel(newRot, newRotVel);
    }