---
title: EntityTargetValue
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/entitytargetvalue
---

# EntityTargetValue

A value containing an original gesture value along with a targeted entity.

## Declaration

```swift
@dynamicMemberLookup struct EntityTargetValue<Value>
```

## Overview

Overview Spatial data from a location returned by a gesture can be converted to and from the entity using functions defined in RealityCoordinateSpaceConverting. For example, here’s how to convert location from a DragGesture to the parent of an Entity: DragGesture(coordinateSpace: .global).targetedToEntity().updating($state) { state, value, _ in     let location = value.convert(         value.location, from: .global, to: value.entity.parent     )     ... }

## Topics

### Accessing gesture info

- [entity](realitykit/entitytargetvalue/entity.md)
- [gestureValue](realitykit/entitytargetvalue/gesturevalue.md)
- [subscript(dynamicMember:)](realitykit/entitytargetvalue/subscript(dynamicmember:).md)

### Instance Methods

- [unproject(_:from:to:)](realitykit/entitytargetvalue/unproject(_:from:to:).md)
- [unproject(_:to:)](realitykit/entitytargetvalue/unproject(_:to:).md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [RealityCoordinateSpaceConverting](realitykit/realitycoordinatespaceconverting.md)
- [RealityCoordinateSpaceProjecting](realitykit/realitycoordinatespaceprojecting.md)

## See Also

### Direct and indirect gestures

- [Transforming RealityKit entities using gestures](realitykit/transforming-realitykit-entities-with-gestures.md)
- [InputTargetComponent](realitykit/inputtargetcomponent.md)
- [ManipulationComponent](realitykit/manipulationcomponent.md)
- [GestureComponent](realitykit/gesturecomponent.md)
