public void CmdSetPositionFromReset(GameObject fromObj, GameObject otherPlayer, Vector3 setPos) { if (fromObj.GetComponent <IPlayerSync>() == null) //Validation { return; } IPlayerSync otherPlayerSync = otherPlayer.GetComponent <IPlayerSync>(); otherPlayerSync.SetPosition(setPos); }
public void ChangeMatricies(Transform newParent) { // Debug.Log("Not changing matrices as it f***s up move"); // return; if (isServer) { NetworkIdentity netIdent = newParent.GetComponent <NetworkIdentity>(); if (registerTile.ParentNetId != netIdent.netId) { registerTile.ParentNetId = netIdent.netId; playerSync.SetPosition(transform.localPosition); } } else { registerTile.SetParentOnLocal(newParent); } Camera.main.transform.parent = newParent; Debug.Log("Change Matricies"); }