GetJoystickAxises

From OxeyeWiki

(Difference between revisions)
Jump to: navigation, search
Thewreck (Talk | contribs)
(Created page with '{{DaisyMethod | daisy.getJoystickAxises(joystick, stick) | This method returns the X and Y component of a chosen joystick's specified stick. | {{MethodParam|joystick|A number|The...')

Latest revision as of 16:56, 18 January 2010

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)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox