---
title: "location(in:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/entitygesturerecognizer/location(in:)"
---

# location(in:)

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

## Declaration

```swift
@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

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

## Discussion

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.

## See Also

### Using the gesture recognizer

- [entity](realitykit/entitygesturerecognizer/entity.md)
