Beispiel #1
0
    void RpcSyncUnitPosition(NetworkIdentity mover, Vector3 newPos, Vector3 newVel)
    {
        if (mover == null)
        {
            Debug.LogWarning("[SyncUnitPosition] Can't find unit which was supposed to move to " + newPos);
            return;
        }

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

        um.SyncPosAndVel(newPos, newVel);
    }