Skip to main content
Version: 14 May 2024

Spatial Anchors Overview

A Spatial Anchor is a shared reference point for tethering virtual content to a persistent physical location. (For more details about this feature, see the Spatial Anchors page.) This common reference allows you to place content in the physical world and have it stay in the same place and orientation without any drift across multiple user sessions, and to have co-located content aligned across multiple networked devices.

note

Users must localize into a Space before creating spatial anchors. Use the Spaces application to map and save new Spaces.

caution

This feature requires the SPATIAL_ANCHORS permission to be enabled in your project's Manifest Settings. (Edit > Project Settings > Magic Leap > Manifest Settings)

How Magic Leap 1's PCFs are different from Anchors

This section is for users transitioning from Magic Leap 1 to Magic Leap 2 devices. While the Magic Leap 1's anchor system (Persistent Coordinate Frames, or PCFs) was automatic, anchors on Magic Leap 2 have to be created explicitly.

Magic Leap 1 PCFsMagic Leap 2 Spatial Anchors
SingleUserMultiSessionMLSpatialAnchorMappingMode_OnDevice
MultiUserMultiSessionMLSpatialAnchorMappingMode_ARCloud

Spaces

The Spaces application allows you to create new spaces and localize into them. It also allows you to visualize all of the spatial anchors associated with a given Space.

info

Without AR Cloud, Magic Leap 2 allows users to save up to 5 Spaces locally on the device.

note

Spatial Anchors can be created from inside your application. See Spatial Anchors API for more details.