Colocation and Shared Spatial Anchors result in wrong frame of reference
Hello everyone! I'm developing a networked experience using Unity 6 with Netcode for Gameobjects and the MetaXR SDK. I am trying to get Shared Spatial Anchors working using Colocation so that the players can see the same frame of reference in Mixed Reality. I managed to get Colocation and Shared Spatial Anchor sharing to work but when I try to align my player rig using the Shared Spatial Anchor from the host there is a misalignment in the scene. No obvious errors or warning are being thrown,I am using the code in the documentation as well as a video tutorial from "XR Dev Rob - Colocation with Meta’s Shared Spatial Anchors & the new Colocation Discovery API" as my main point of reference for my own code. Below is my alignment code if (await unboundAnchor.LocalizeAsync()) { Debug.Log($"Anchor localized successfully, UUID: {unboundAnchor.Uuid}"); var anchorGameObject = GameObject.Instantiate(_anchorPrefab); var spatialAnchor = anchorGameObject.GetOrAddComponent<OVRSpatialAnchor>(); anchorGameObject.name = $"Anchor_{unboundAnchor.Uuid}"; unboundAnchor.BindTo(spatialAnchor); _alignmentManager.AlignUserToAnchor(spatialAnchor); return; } With AlignUserToAnchor(OVRAnchor anchor public void AlignUserToAnchor(OVRSpatialAnchor anchor) { if (anchor == null || anchor.Localized == false) { Debug.LogError("Anchor is not localized yet."); return; } StartCoroutine(AlignmentCoroutine(anchor)); } private IEnumerator AlignmentCoroutine(OVRSpatialAnchor anchor) { var anchorTransform = anchor.transform; for (int alignmentCount = 2; alignmentCount > 0; alignmentCount--) { _cameraRigTransform.position = Vector3.zero; _cameraRigTransform.eulerAngles = Vector3.zero; yield return null; Vector3 offset = anchorTransform.InverseTransformPoint(Vector3.zero); Quaternion inverseYaw = Quaternion.Euler(0f, -anchorTransform.eulerAngles.y, 0f); _cameraRigTransform.position = offset; _cameraRigTransform.rotation = inverseYaw; Debug.Log($"Aligned camera rig position: {_cameraRigTransform.position}, rotation {_cameraRigTransform.eulerAngles}"); yield return new WaitForEndOfFrame(); } Debug.Log($"Alignment complete"); } } I am wondering if I am missing something that needs to be initialized to get the spatial data in order so that the Anchors can get localized correctly. Or if it is something else that I am missing. Thank you for your help! Kind regardsSolved169Views0likes1CommentIs it possible to test the Colocation Building Block functionality without a verified organization?
Hello Community, I have the following problem: I created an unity project with only the colocation building block (and all the dependent building blocks) and Auto Matchmaking Building Block. I also uploaded the apk into the dashboard, created a new channel and added three test users to the channel. On the two headsets I logged in with two different test users. But when the second headset tries to load the shared spatial anchor I get: "Failed to share the spatial anchor" error message on the first device. My fear is, that it is impossible (only for testing purpose) to build an Unity Application with Meta's Colocation Building Block without having a verfied organization in the Meta Quest Dashboard.Solved3.1KViews0likes1CommentColocation
Hello everyone, i'm currently working on a simple local multiplayer app with the new sdk meta xr 65.0 and i'm trying to use the building block colocation: the app seems to works only with two people and only 2 quest 3 devices and the colocation is not accurate as it should be. For Example i tried meta apps like Cryptic cabinet and the colocation works great on all devices that enter the same room, but i downloaded the same git project and after i published it only 2 Quest3 devices are badly colocated. I alredy created an app on meta quest dashboard but i'm sure a did miss something, any ideas? Thanks1KViews4likes0Comments