<div class='sourceset sourceset-android'>Android</div>

```kotlin
public class SpatialInputEvent(
    public val source: Source,
    public val pointerType: Pointer,
    public val action: Action,
    public val timestamp: Long,
    public val hitPosition: Vector3?,
    public val origin: Vector3,
    public val direction: Vector3,
)
```

Defines Spatial input events for Compose, representing a user's input in 3D space. These are
fired when an [InteractionPolicy](/jetpack-compose/androidx.xr.compose/compose/classes/InteractionPolicy) is attached to a Composable.

#### Parameters

| | |
| --- | --- |
| source | Type of source (e.g. hands, controller, head) that generated this event. |
| pointerType | Type of the individual pointer (e.g. left, right or default) for this event. |
| timestamp | Timestamp from [SystemClock.uptimeMillis](https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()) time base. |
| hitPosition | The offset of the point of interaction, in pixels, relative to the center of the Composable this input targets. This is null if an input ray no longer hits the Composable during an [Action](/jetpack-compose/androidx.compose.remote/remote-creation-compose/interfaces/Action) sequence. |
| origin | The origin of the ray in the receiver's activity space, in pixels. |
| direction | A point indicating the direction the ray is pointing, in the receiver's activity space, in pixels. |
| action | Actions similar to Android's [MotionEvent](https://developer.android.com/reference/android/view/MotionEvent) for keeping track of a sequence of events on the same target, e.g., HOVER_ENTER -> HOVER_MOVE -> HOVER_EXIT, DOWN -> MOVE -> UP. |