public void CreateRealmItem(string realmId, XRWorldItem item) { // Get transform of the item GameObject Transform t = item.gameObject.transform; // Send to Teleportal TeleportalNet.Shared.Send(TeleportalCmd.REALM_ITEM_ADD, realmId, item.Title, t.position.x.ToString(), t.position.z.ToString(), t.eulerAngles.y.ToString(), t.eulerAngles.x.ToString()); }
public void CreateRealmItem(string realmId, XRWorldItem item) { // Get item transform Transform t = item.gameObject.transform; float posX = t.position.x; float posY = t.position.y; float posZ = t.position.z; float heading = t.eulerAngles.y; float pitch = t.eulerAngles.x; // Send to Teleportal TeleportalNet.Shared.Send(TeleportalCmd.REALM_ITEM_ADD, realmId, item.Id, posX.ToString(), posY.ToString(), posZ.ToString(), heading.ToString(), pitch.ToString()); }