diff --git a/SpatialObservers/LuminSpatialMeshObserver.cs b/SpatialObservers/LuminSpatialMeshObserver.cs index 80eadb7..ee01fe9 100644 --- a/SpatialObservers/LuminSpatialMeshObserver.cs +++ b/SpatialObservers/LuminSpatialMeshObserver.cs @@ -11,6 +11,7 @@ using UnityEngine.Experimental.XR; using UnityEngine.XR.MagicLeap; using XRTK.Definitions.SpatialAwarenessSystem; +using XRTK.Services; using XRTK.Utilities; #endif // PLATFORM_LUMIN @@ -102,9 +103,8 @@ public override void Update() // Update the observer location if it is not stationary if (!IsStationaryObserver) { - var cameraTransform = CameraCache.Main.transform; - ObserverOrigin = cameraTransform.position; - ObserverOrientation = cameraTransform.rotation; + ObserverOrigin = MixedRealityToolkit.CameraSystem.CameraRig.CameraTransform.position; + ObserverOrientation = MixedRealityToolkit.CameraSystem.CameraRig.CameraTransform.rotation; } ConfigureObserverVolume(); diff --git a/package.json b/package.json index c0f1636..0e22b31 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,6 @@ "author": "XRTK Team (https://github.com/XRTK)", "dependencies": { "com.unity.xr.magicleap": "2.0.0-preview.19", - "com.xrtk.core": "0.1.21" + "com.xrtk.core": "0.1.25" } } \ No newline at end of file