location(in:)
Returns the unprojected location of the gesture represented by the receiver in the space of the given entity.
Declaration
@MainActor @preconcurrency func location(in entity: Entity?) -> SIMD3<Float>?Parameters
- entity:
An entity in whose space the location is computed. A
nilentity 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.