Object placed above MRUK furniture "jumps" up/down when pushing right thumbstick
Context Unity + Meta XR Building Blocks. I'm building an AR app (Passthrough + MR Utility Kit). I show a world-space UI dialog above an MRUK table (Canvas in world space, RectTransform placed at the table center + slight lift to sit on the surface -> all via script). Symptom Whenever I push the right controller thumbstick downward, the dialog appears to "jump" ~0.5 m up, and pushing again makes it jump back down. This happened both on the device and in the Simulator. What it actually is It's not the dialog moving. Logging showed Camera.main.transform.position.y toggling between two values (1.047 <-> 1.547), while the dialog's world Y stayed constant.Solved56Views0likes1CommentBlack Skybox in Play Mode when using META XR SDK v77 [Building Block Camera Rig]
In META XR SDK version 77, when adding the [BuildingBlock] Camera Rig, there is a configuration issue that causes the Skybox to appear black when entering Play Mode. Steps to Reproduce: Create a new project with META XR SDK v77. Add the [BuildingBlock] Camera Rig to the scene. Press Play. Observe that the Skybox is black instead of rendering normally. Cause: The Camera components inside the Camera Rig are set with the Background Type set to Solid Color (black) instead of Skybox... So set it to Skybox Solution / Workaround: In the Hierarchy, locate and expand [BuildingBlock] Camera Rig. Expand TrackingSpace, then CenterEyeAnchor. Select the Camera component, expand the Environment section. Change Background Type to Skybox. (If necessary) Repeat the process for LeftEyeAnchor and RightEyeAnchor Notes: It’s surprising that in v77 this detail was overlooked, considering that in previous META examples they used a different Camera Rig configuration without this problem. The issue seems to stem from the updated default configuration of [BuildingBlock] Camera Rig in v77.46Views1like0CommentsHow to geometrically align a 3D model to real furniture?
For my video-see-through AR application I want a model to automatically be placed on the biggest found table surface. I achieved the first step: The model is correctly positioned at the table center. However, the orientationis not correct. I want the model to "lie down" on the table, means laying on the back, facing up, while the longest side of the model is orientated just as the longest side of the table - see the following pictures: After a very long time trying, I could not figure out how to align the model correctly. If you have any idea/hint/ or clue I could try, please let me know. Used Asset for testing: Low Poly Human I added an Empty (called ModelPlacer) where I added the script (see below) and pulled this asset in the modelInstance field. Used Meta XR Building Blocks: Camera Rig Passthrough MR Utility Kit Scene Debugger Effect Mesh Hand Tracking Controller Tracking Technical Specifications: Unity 2022.3.50f1 VR-Glasses: Meta Quest 3 Meta MR Utility Kit Code: using Meta.XR.MRUtilityKit; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ModelPlacer : MonoBehaviour { public GameObject modelPrefab; private GameObject modelInstance; void Start() { MRUK.Instance?.RegisterSceneLoadedCallback(OnSceneLoaded); } private void OnSceneLoaded() { SpawnModel(); AlignModelWithSurface(); } public void SpawnModel() { Vector3 spawnPosition = new Vector3(0.0f, 1.0f, -1.0f); modelInstance = Instantiate(modelPrefab, spawnPosition, Quaternion.identity); } public void AlignModelWithSurface() { var largestSurface = MRUK.Instance?.GetCurrentRoom()?.FindLargestSurface(MRUKAnchor.SceneLabels.TABLE); if (modelInstance != null) { if (largestSurface != null) { modelInstance.transform.SetParent(largestSurface.transform); Renderer modelRenderer = modelInstance.GetComponent<Renderer>(); modelInstance.transform.rotation = Quaternion.Euler(-90, 0, 0); Vector3 modelCenter = modelRenderer.bounds.center; Vector3 surfaceCenter = largestSurface.transform.position; Vector3 positionOffset = surfaceCenter - modelCenter; Vector3 adjustedPosition = modelInstance.transform.position + positionOffset; modelInstance.transform.position = adjustedPosition; } else { Debug.LogWarning("No surface found."); } } else { Debug.LogWarning("modelInstance is null."); } } }941Views0likes3CommentsBuilding custom code upon Building Blocks
Hello Community, I want to implement my own functionalities on top of functionalities the Building Blocks are providing. How is that possible? And what is the best way? For example: I added the "Spatial Anchor Core" Building Block. Now, I want to use the method "InstantiateSpatialAnchor()" the script attached to the Building Block is providing, in a own script.298Views0likes0Comments