Protocol

ARTrackable

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

Declaration

@protocol ARTrackable

Overview

This protocol is adopted by ARKit classes, such as the ARFaceAnchor class, that represent moving objects in a scene.

ARKit automatically manages representations of such objects in an active AR session, ensuring that changes in the real-world object's position and orientation (the transform property for anchors) are reflected in corresponding ARKit objects. The isTracked property indicates whether the current transform is valid with respect to movement of the real-world object.

Trackable anchor classes affect other ARKit behaviors:

  • The getCurrentWorldMapWithCompletionHandler: method automatically includes only non-trackable anchors in the ARWorldMap it creates. (After you create a world map, you can add other anchors to it if you choose.)

  • ARSCNView and ARSKView automatically hide the nodes for anchors whose isTracked property is NO.

  • World-tracking sessions use non-trackable anchors to optimize tracking quality in the area around each anchor. Trackable anchors do not affect world tracking.

Topics

Monitoring Tracking State

isTracked

A Boolean value that indicates whether the object’s transform is valid.

Required.

Relationships

Inherits From

See Also

Subclassing

ARAnchorCopying

Support for custom ARAnchor subclasses.