Joystick.getAxisPosition

Get the current position of a joystick axis.

If the joystick is not connected, this function returns 0.

class Joystick
static
float
getAxisPosition

Parameters

joystick uint

Index of the joystick

axis Axis

Axis to check

Return Value

Type: float

Current position of the axis, in range [-100 .. 100].

Meta