Difference between revisions of "Legacy:Functions/Input/Joystick"
From Spherical
< Legacy:Functions | Input
(created) |
(No difference)
|
Latest revision as of 23:09, 30 May 2013
Joystick
General device polling
- GetNumJoysticks(): Returns the number of joysticks available to Sphere.
- GetNumJoystickButtons(joystick): Returns the number of buttons available on this joystick.
- GetNumJoystickAxes(joystick): Returns the number of available axes on the given joystick.
- GetTalkActivationButton(): Get joystick button used to activate talk scripts.
- SetTalkActivationButton(button): Set joystick button used to activate talk scripts.
Button status
- IsJoystickButtonPressed(joystick, button): Find if a button on a joystick is being held down.
Orientation
- GetJoystickAxis(joystick, axis): Returns the current joystick axis position in normalized coordinates fro -1 to 1.
- Allowed axis values:
- JOYSTICK_AXIS_X
- JOYSTICK_AXIS_Y
- JOYSTICK_AXIS_Z
- JOYSTICK_AXIS_R (rotation)