A real-world position and orientation that can be used for placing objects in an AR scene.


To track the positions and orientations of real or virtual objects relative to the camera, create anchor objects and use the add(anchor:) method to add them to your AR session.

ARKit also automatically adds anchors when you enable the planeDetection option in a world tracking session.


Creating Custom Anchors

init(transform: matrix_float4x4)

Creates a new anchor object with the specified transform.

Tracking Anchors

var identifier: UUID

A unique identifier for the anchor.

var transform: matrix_float4x4

A matrix encoding the position, orientation, and scale of the anchor relative to the world coordinate space of the AR session the anchor is placed in.


Inherits From

See Also

Real-World Objects and Positions

class ARHitTestResult

Information about a real-world surface found by examining a point in the device camera view of an AR session.

protocol ARTrackable

A real-world object in a scene for which ARKit tracks changes to position and orientation.