GetJoystickAxises

From OxeyeWiki

Revision as of 16:56, 18 January 2010 by Thewreck (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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