GamepadAxis

value class GamepadAxis(val index: Int)(source)

A gamepad axis in SDL's standard layout: the two sticks and the two analog triggers.

PlatformEvent.GamepadAxisMoved reports stick values from -1 to 1, where negative is left on an X axis and up on a Y axis, and trigger values from 0 (released) to 1 (fully pressed). Every axis EventPump reports has an index below COUNT.

Constructors

Link copied to clipboard
constructor(index: Int)

Types

Link copied to clipboard
object Companion

Holds the axes a gamepad reports.

Properties

Link copied to clipboard
val index: Int

Functions

Link copied to clipboard
open override fun toString(): String