pub fn axis_position(joystick: u32, axis: Axis) -> f32
Expand description

Get the current position on a given axis, on a given joystick.

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

Arguments

  • joystick - Index of the joystick
  • axis - Axis to check

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