Blending AR with Cesium

Hi, I have queries that I would like to ask. I am currently developing an application with Cesium that requires AR. Most project that I seen for AR is that they use Cesium as a mini tileset for people to interact with. My usecase is rather different, instead of a mini tileset, I want it to be full scale so that I can overlay building when pointing the AR camera at the building in the physical world. Basically, I am trying to achieve streetscape from Google API using Cesium and custom data:

My idea is that, since dynamic camera is not required. Can I use the XR Origin object with a Cesium Globe Anchor attached to the Camera. Then I will update the anchor position using data from the GPS of the phone and orientation using the Gyroscope. Can this be achieved?

@Wong Yes, this sort of capability can be achieved! It requires a bit of setup to get Unity’s XR support and Cesium for Unity to play well together, but we’ve documented an example of this in our Magic Leap 2 guide. Even if you’re not using a Magic Leap 2, it will give you an idea of how to combine the XR Origin with CesiumGlobeAnchor and CesiumGeoreference!

Alright, thank you very much!

@azrogers

Hi, so sorry to bother again. I followed the tutorial of the Magic Leap 2 guide and everything seems to work fine. However, I have one problem, whenever the application starts up, the tileset seems to be rotated, like it doesnt follow the actual north of the compass. So my north will always be the facing where I start the application. Do you know how I can make it such that, it spawns according to the actual compass direction?