<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/HasTransform/move(to:relativeTo:duration:timingFunction:)-6la93",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12HasTransformPAAE4move2to10relativeTo8duration14timingFunctionAA27AnimationPlaybackControllerCSo13simd_float4x4a_AA6EntityCSgSdAA0l6TimingK0VtF"
  },
  "title" : "move(to:relativeTo:duration:timingFunction:)"
}
-->

# move(to:relativeTo:duration:timingFunction:)

Moves an entity over a period of time to a new location given by a 4x4
matrix.

```
@discardableResult @MainActor @preconcurrency func move(to target: float4x4, relativeTo referenceEntity: Entity?, duration: TimeInterval, timingFunction: AnimationTimingFunction = .default) -> AnimationPlaybackController
```

## Parameters

`target`

A 4x4 matrix that indicates the new location.

`referenceEntity`

The entity that defines a frame of reference. Set
this to `nil` to indicate world space.

`duration`

The time in seconds over which the move should occur.

`timingFunction`

A timing function that controls the progress of the
animation.

## Return Value

An [`AnimationPlaybackController`](/documentation/RealityKit/AnimationPlaybackController) instance that you use to
control the animation playback.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)