ArcGIS global scene and Unity3d augmented reality

04-15-2023 05:20 AM
New Contributor


I want to superimpose ArcGIS data in an AR scene with plane tracking using Unity ARFoundation (ARKit, ARCore for mobile devices) . Has anyone tried this already? 

Tags (3)
0 Kudos
1 Reply
New Contributor III

I was able to do this by having the following basic scene setup

    • Map
    • XRRoot
      • XROffset 
        • XRRig
        • Other Objects that exist in AR space.

The XRRoot Transform should always be at origin, but can be scaled and rotated
The XROffset Transform should always have a local scale of 1 and no rotation. This is effectively your new world origin.

Adjusting the scale of the XRRoot "zooms" the map. a scale of 1000 for example, zooms out the map to a 1/1000 scale. Rotating the XRRoot "rotates" the map. Also note, if you have extents set, those extents need to be scaled as well so it looks like the map is changing size within its bounds.

The XROffset is used to "move" the map. Please note that the map origin and extent origin need to be the same for this to work properly.

You will also need to update camera clipping planes to scale as well and copy the transform of ArcGIS Camera to match exactly the XR camera.

You will also need to use the Transform and InverseTransform functions to convert between true world space and your new XR world space often (see and related functions).

I hope this helps. Sorry if this is overly complicated.