<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/EntityTranslationGestureRecognizer/setTranslation(_:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:10RealityKit34EntityTranslationGestureRecognizerC03setD0_2inys5SIMD3VySfG_0A10Foundation0C0CSgtF"
  },
  "title" : "setTranslation(_:in:)"
}
-->

# setTranslation(_:in:)

Sets the translation of the receiver in the entity’s coordinate space

```
@MainActor @preconcurrency func setTranslation(_ translation: SIMD3<Float>, in entity: Entity?)
```

## Parameters

`translation`

A point that identifies the new translation value.

`entity`

An entity in whose space the translation is to occur.
A `nil` entity will result in world space.

---

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)