Creates a reference object (for 3D object detection) from the specified region of the session’s world space.
- iOS 12.0+
A transform matrix defining the origin and orientation of the local coordinate system for the region to extract.
A point, relative to the origin specified by
transform, that defines the center of the bounding box for the region to extract.
The width, height, and depth of the region to extract, centered on the
centerpoint and oriented to the local coordinate system specified by
ARReference representing the specified region of the world map, or
nil if an object could not be extracted.
To use the extracted reference object for 3D object detection, assign it to the
detection property of a world tracking configuration. You can bundle reference objects in an app by saving them to files and adding them to an Xcode asset catalog.
When ARKit detects a reference image, the transform of the resulting
ARObject is based on the orgin of the reference object's coordinate system—the transform you specify when extracting the reference object. For example, if a reference object represents a physical item that sits on a horizontal surface, virtual content should appear to sit on whatever surface the physical object does. To adjust a reference object's origin after extracting it, use the