reanchor(_:preservingWorldTransform:)
Changes the entity’s anchoring, preserving either the world transform or the local transform.
Declaration
@MainActor @preconcurrency func reanchor(_ target: AnchoringComponent.Target, preservingWorldTransform: Bool = true)Parameters
- target:
Describes how the entity should be anchored in AR.
- preservingWorldTransform:
A Boolean you set to
trueto preserve the current world space position, orfalseto use the position relative to the previous anchor for the new anchor.