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

# velocity(in:)

The velocity of the translation gesture in the space of the specified entity.

## Declaration

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

## Parameters

- `entity`: The entity in whose space the velocity of the translation gesture is computed. A nil entity will result in world space.

## Return Value

Return Value The velocity of the translation gesture, in the space of the specified entity, in meters per second.

## See Also

### Using the recognizer

- [entity](realitykit/entitytranslationgesturerecognizer/entity.md)
- [canPrevent(_:)](realitykit/entitytranslationgesturerecognizer/canprevent(_:).md)
- [location(in:)](realitykit/entitytranslationgesturerecognizer/location(in:).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)
