Joystick_axis - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
Description
Gets the position of the given axis on the given joystick and returns the result which is a value between -1 and 1, the x axis is 1, y is 2, z is 3, roll is 4, etc.
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The index of the joystick, must be equal to or larger than 0. |
axis | integer | The index of the axis to get the position of. |
Return Values
double: Returns the position of the axis on the joystick.
Example Call
// demonstrates obtaining the position of the first axis on player 1's joystick
var pos;
pos = joystick_axis(0, 0);
NOTOC