Anchors
An overview of the Anchors example scene which utilizes the Spaces application.
An overview of the Anchors example scene which utilizes the Spaces application.
The Magic Leap 2 has a variety of sensors and tracking capabilities that enable the creation of experiences where virtual content appears to stick and behave as though it were part of the user’s physical environment. As a developer of XR applications, you have the challenging task of leveraging all of the myriad features and technologies exposed by the platform to build experiences that work as well as possible on the hardware given your particular use case. Incorporating the user’s physical environment into your application is both a technical and a design challenge that is unique to developing for XR platforms where the user is able to see their physical surroundings. You’ll need to understand what technologies are available, and the tradeoffs between them, to effectively design experiences that blend virtual objects with physical spaces as seamlessly as possible.
Learn how to import and export maps between devices using ADB.
Learn how to use the Spaces app to localize into and create spatial maps.
Learn about Spatial anchors and how they can be used inside your application.
Learn how to link objects to Spatial Anchors and use them to create persistent content.
Learn the core API calls required to implement Magic Leap 2's Spatial Anchors API.
Learn how to get notified when spatial anchors are created, added or removed.
Contains code that can be used as a reference or demo Magic Leap 2's Spatial Anchors functionality.
Learn how to link objects to Spatial anchors and use them to create persistent content.
The Magic Leap 2 utilizes its three world cameras and depth camera to map and localize itself in the physical world. Device sensors scan the MagicLeap 2 user’s environment, process that information, and use it to create a digital representation of the physical world. The Magic Leap device uses depth, distinct features within the environment, clear planes like walls, ceilings, floors, and architectural occlusion to build a map of the real-world environment and then determine the device’s position and orientation within that environment (called ‘localization’). Apps can use this representation to place digital objects that may persist across sessions and occlude rendering.