JoystickAxis

class JoystickAxis(axis: () -> Float, threshold: Float = 0.0f, reverse: Boolean) : Control

An axis of a joystick that has a value between -1 and 1.

Parameters

axis

the value of the axis to watch

threshold

the amount the axis has to be moved in either direction before it is considered 'displaced'

Constructors

Link copied to clipboard
constructor(axis: () -> Float, threshold: Float = 0.0f, reverse: Boolean)

Properties

Link copied to clipboard

Whether the current boolean state just changed to false.

Link copied to clipboard

Whether the current boolean state just changed to true.

Link copied to clipboard

The current boolean state of this control.

Link copied to clipboard

Whether the current boolean state just changed.

Link copied to clipboard

The amount the joystick is being moved.

Functions

Link copied to clipboard
open override fun update()

Updates the current state and the rising, falling, and changed states. Further, schedules commands accordingly.