One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

HasAnchoring

protocol · iOS 13.0+ · SDK 27.1

@MainActor @preconcurrency protocol HasAnchoring : Entity

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

Members (4)

get · iOS 13.0+

anchorIdentifier

Swift declaration
@MainActor @preconcurrency var anchorIdentifier: UUID? { get }

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

method · iOS 13.0+

reanchor

Swift declaration
@MainActor @preconcurrency func reanchor(_ target: AnchoringComponent.Target, preservingWorldTransform: Bool = true)

Changes the entity’s anchoring, preserving either the world transform or the local transform. - Parameters: - target: Describes how the entity should be anchored in AR. - preservingWorldTransform: A Boolean you set to `true` to preserve the current world space position, or `false` to use the position relative to the previous anchor for the new anchor.

get · iOS 13.0+

anchoring

Swift declaration
@MainActor @preconcurrency var anchoring: AnchoringComponent { get set }

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

set · iOS 13.0+

anchoring

Swift declaration
@MainActor @preconcurrency var anchoring: AnchoringComponent { get set }

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

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →