InputEvent.Source
class InputEvent.Source
Specifies the source (e.g. hands, controller, head) of the input event.
Summary
Public companion properties |
|
|---|---|
InputEvent.Source |
Event is based on (one of) the user's controller(s). |
InputEvent.Source |
Event is based on a mix of the head, eyes, and hands. |
InputEvent.Source |
Event is based on one of the user's hands. |
InputEvent.Source |
Event is based on the user's head. |
InputEvent.Source |
Event is based on a 2D mouse pointing device. |
InputEvent.Source |
Unknown source. |
Public companion properties
CONTROLLER
val CONTROLLER: InputEvent.Source
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.
GAZE_AND_GESTURE
val GAZE_AND_GESTURE: InputEvent.Source
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.
HANDS
val HANDS: InputEvent.Source
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.
HEAD
val HEAD: InputEvent.Source
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.
MOUSE
val MOUSE: InputEvent.Source
Event is based on a 2D mouse pointing device. Ray origin behaves the same as for 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.