createAnchorNode

open override fun createAnchorNode(): AnchorNode?

Creates an AnchorNode that is attached to this trackable, using the given initial pose in the world coordinate space.

The type of trackable will determine the semantics of attachment and how the anchor's pose will be updated to maintain this relationship. Note that the relative offset between the pose of multiple anchors attached to a trackable may adjust slightly over time as ARCore updates its model of the world.

Throws

NotTrackingException

if the trackable's tracking state was not TrackingState.TRACKING

SessionPausedException

if the session had been paused.

ResourceExhaustedException

if too many anchors exist.

if this trackable doesn't support anchors.