GetJoystickAxises
From OxeyeWiki
|
daisy.getJoystickAxises(joystick, stick) | ||
|
This method returns the X and Y component of a chosen joystick's specified stick. | ||
| Parameter | Expected Type | Description |
| joystick | A number | The joystick Id, for example gotten through the hook joystickButtonPressed. Starting at 1 |
| stick | A number | The stick to get axis data from. Starting at 1. |
| Returns | ||
|
Returns two values to the stack, X and Y values of the sticks, ranging from -1 to 1. | ||
| Daisymoon Video Lib |
|---|
Example
local xAxis, yAxis = daisy.getJoystickAxises(1, 1)