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

# location(in:)

Returns the unprojected location of the gesture represented by the receiver in the space of the given entity.

```
@MainActor @preconcurrency func location(in entity: Entity?) -> SIMD3<Float>?
```

## Parameters

`entity`

An entity in whose space the location is computed.
A `nil` entity will result in world space.

## Return Value

The 3D position identifying the location of the gesture in the space specified.

## Discussion

The location is typically the result of a centroid of touches for a gesture, unprojected onto the associated `entity`, and then
converted into the space of the entity passed in, or world space if `nil` is passed in.

---

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)