---
title: "reanchor(_:preservingWorldTransform:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/hasanchoring/reanchor(_:preservingworldtransform:)"
---

# reanchor(_:preservingWorldTransform:)

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

## Declaration

```swift
@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 true to preserve the current world space position, or false to use the position relative to the previous anchor for the new anchor.
