getGamepadStickAxisX

Script::getGamepadStickAxisX

Returns the value of the stick’s horizontal axis, with -1.0 being left, 0.0 neutral and 1.0 right.

Declaration

float getGamepadStickAxisX(GamepadID gamepadID, InputGamepadStick stick);

Parameters

Name

Type

Description

gamepadID

GamepadID

The gamepad to get the horizontal stick axis from.

stick

InputGamepadStick

The stick to get the horizontal axis value from.

Returns

A value between -1.0 and 1.0, with 0.0 being the neutral position, -1.0 being completely pushed left and 1.0 being completely pushed right.