---
title: "location(in:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/entitytranslationgesturerecognizer/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 recognizer

- [entity](realitykit/entitytranslationgesturerecognizer/entity.md)
- [canPrevent(_:)](realitykit/entitytranslationgesturerecognizer/canprevent(_:).md)
- [reset()](realitykit/entitytranslationgesturerecognizer/reset().md)
- [setTranslation(_:in:)](realitykit/entitytranslationgesturerecognizer/settranslation(_:in:).md)
- [touchesBegan(_:with:)](realitykit/entitytranslationgesturerecognizer/touchesbegan(_:with:).md)
- [touchesCancelled(_:with:)](realitykit/entitytranslationgesturerecognizer/touchescancelled(_:with:).md)
- [touchesEnded(_:with:)](realitykit/entitytranslationgesturerecognizer/touchesended(_:with:).md)
- [touchesMoved(_:with:)](realitykit/entitytranslationgesturerecognizer/touchesmoved(_:with:).md)
- [translation(in:)](realitykit/entitytranslationgesturerecognizer/translation(in:).md)
- [velocity(in:)](realitykit/entitytranslationgesturerecognizer/velocity(in:).md)
