InputEvent.Source


object InputEvent.Source


Specifies the source (e.g. hands, controller, head) of the input event.

Summary

Constants

const Int

Event is based on (one of) the user's controller(s).

const Int

Event is based on a mix of the head, eyes, and hands.

const Int

Event is based on one of the user's hands.

const Int

Event is based on the user's head.

const Int

Event is based on a 2D mouse pointing device.

const Int

Unknown source.

Constants

SOURCE_CONTROLLER

Added in 1.0.0-alpha05
const val SOURCE_CONTROLLER = 2: Int

Event is based on (one of) the user's controller(s). Ray origin and direction are for a controller aim pose. Action state is based on the primary button on the controller, usually the bottom-most face button.

SOURCE_GAZE_AND_GESTURE

Added in 1.0.0-alpha05
const val SOURCE_GAZE_AND_GESTURE = 5: Int

Event is based on a mix of the head, eyes, and hands. Ray origin is at average between eyes and points in direction based on a mix of eye gaze direction and hand motion. During a two-handed zoom/rotate gesture, left/right pointer events will be issued; otherwise, default events are issued based on the gaze ray. Action state is based on if the user has done a pinch gesture or not.

Events from this source are considered sensitive and hover events are never sent.

SOURCE_HANDS

Added in 1.0.0-alpha05
const val SOURCE_HANDS = 3: Int

Event is based on one of the user's hands. Ray is a hand aim pose, with origin between thumb and forefinger and points in direction based on hand orientation. Action state is based on a pinch gesture.

SOURCE_HEAD

Added in 1.0.0-alpha05
const val SOURCE_HEAD = 1: Int

Event is based on the user's head. Ray origin is at average between eyes, pushed out to the near clipping plane for both eyes and points in direction head is facing. Action state is based on volume up button being depressed.

Events from this source are considered sensitive and hover events are never sent.

SOURCE_MOUSE

Added in 1.0.0-alpha05
const val SOURCE_MOUSE = 4: Int

Event is based on a 2D mouse pointing device. Ray origin behaves the same as for Source.SOURCE_HEAD and points in direction based on mouse movement. During a drag, the ray origin moves approximating hand motion. The scroll wheel moves the ray away from / towards the user. Action state is based on the primary mouse button.

SOURCE_UNKNOWN

Added in 1.0.0-alpha05
const val SOURCE_UNKNOWN = 0: Int

Unknown source.