Class MLSpatialAnchors

java.lang.Object
org.lwjgl.openxr.MLSpatialAnchors

public class MLSpatialAnchors extends Object
The XR_ML_spatial_anchors extension.

Spatial anchors are XrSpace entities tied to a physical location. This allows the developer to place virtual content in real world locations.

The runtime should then adjust the XrSpace over time as needed, independently of all other spaces and anchors, to ensure that it maintains its original mapping to the real world.

Caution

If head pose is lost and regained, spatial anchors may also be lost. It is therefore strongly recommended that once an anchor is created, it is also persisted using the XR_ML_spatial_anchors_storage extension.

Permissions

Android applications must have the com.magicleap.permission.SPATIAL_ANCHOR permission listed in their manifest to use this extension. (protection level: normal)