ControllerAction

Snapshot of input actions for a single controller.

Includes button pressed/touched states, analog values for trigger/grip, and the 2D thumbstick vector. All fields represent the current frame and may be identical to the previous frame; consumers should diff frames themselves if change detection is required. Value ranges: triggerValue/gripValue in 0.0, 1.0; thumbstick vector in -1.0, 1.0.

Constructors

Link copied to clipboard
constructor(xButtonPressed: Boolean, xButtonTouched: Boolean, yButtonPressed: Boolean, yButtonTouched: Boolean, aButtonPressed: Boolean, aButtonTouched: Boolean, bButtonPressed: Boolean, bButtonTouched: Boolean, triggerPressed: Boolean, triggerTouched: Boolean, triggerValue: Float, gripPressed: Boolean, gripValue: Float, thumbstickPressed: Boolean, thumbstickTouched: Boolean, thumbstickValue: ThumbstickValue)

Properties

Link copied to clipboard
val aButtonPressed: Boolean

Whether the A button (on right controller) is pressed.

Link copied to clipboard
val aButtonTouched: Boolean

Whether the A button (on right controller) is touched.

Link copied to clipboard
val bButtonPressed: Boolean

Whether the B button (on right controller) is pressed.

Link copied to clipboard
val bButtonTouched: Boolean

Whether the B button (on right controller) is touched.

Link copied to clipboard
val gripPressed: Boolean

Whether the grip is pressed.

Link copied to clipboard
val gripValue: Float

Analog value of the grip in the range 0.0, 1.0.

Link copied to clipboard
val thumbstickPressed: Boolean

Whether the thumbstick is pressed.

Link copied to clipboard
val thumbstickTouched: Boolean

Whether the thumbstick is touched.

Link copied to clipboard

2D thumbstick value; see ThumbstickValue. Components are in -1.0, 1.0.

Link copied to clipboard
val triggerPressed: Boolean

Whether the trigger button is pressed.

Link copied to clipboard
val triggerTouched: Boolean

Whether the trigger button is touched.

Link copied to clipboard
val triggerValue: Float

Analog value of the trigger in the range 0.0, 1.0.

Link copied to clipboard
val xButtonPressed: Boolean

Whether the X button (on left controller) is pressed.

Link copied to clipboard
val xButtonTouched: Boolean

Whether the X button (on left controller) is touched.

Link copied to clipboard
val yButtonPressed: Boolean

Whether the Y button (on left controller) is pressed.

Link copied to clipboard
val yButtonTouched: Boolean

Whether the Y button (on left controller) is touched.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String