Structure

AnchoringComponent

A description of how virtual content can be anchored to the real world.

Declaration

struct AnchoringComponent

Topics

Creating the Anchor Component

init(AnchoringComponent.Target)

Creates an anchoring component for a given target.

init(ARAnchor)

Creates an anchoring component with the given AR anchor.

Setting a Target

let target: AnchoringComponent.Target

The kind of real world object to which the anchor entity should anchor.

enum AnchoringComponent.Target

The kinds of real world objects to which an anchor entity can be tethered.

Registering a Component Type

static func registerComponent()

Registers a new component type.

Comparing Anchoring Components

static func == (AnchoringComponent, AnchoringComponent) -> Bool

Indicates whether two anchoring components are equal.

static func != (AnchoringComponent, AnchoringComponent) -> Bool

Indicates whether two anchoring components are not equal.

Relationships

Conforms To

See Also

Configuring the Anchor

var anchoring: AnchoringComponent

The component that describes how virtual content is anchored to the real world.

var anchorIdentifier: UUID?

The identifier of the AR anchor with which the anchor entity is associated, or nil if it isn’t currently anchored.

func reanchor(AnchoringComponent.Target, preservingWorldTransform: Bool)

Changes the entity’s anchoring, preserving either the world transform or the local transform.

protocol HasAnchoring

An interface that enables anchoring of virtual content to a real-world object in an AR scene.