Doc:2.6/Manual/Game Engine/Logic/Sensors/Joystick

提供: wiki
< Doc:2.6‎ | Manual‎ | Game Engine‎ | Logic‎ | Sensors
移動先: 案内検索

Joystick sensor

Joystick sensor

The Joystick sensor triggers whenever the joystick moves. It also detects events on a range of ancilliary controls on the joystick device (hat, buttons, etc.). More than one joystick may be used (see "Index"). The exact layout of the joystick controls will depend on the make and model of joystick used.

See Sensor Common Options for common options.

Special Options:

Index
Specifies which joystick to use.
All Events
Sensor triggers for all events on this joystick's current type
Joystick Events
Event Type
A menu to select which joystick event to use
Joystick Single Axis
Single Axis
Detect movement in a single joystick Axis.
Axis Number
1 = Horizontal axis (left/right)
2 = Vertical axis (forward/back)
3 = Paddle axis up/down
4 = Joystick axis twist left/right
Axis Threshold
Threshold at which joystick fires (Range 0 - 32768)
Joystick Hat
Hat
Detect movement of a specific hat control on the joystick.
Hat number
Specifies which hat to use (max. 2)
Hat Direction
Specifies the direction to use: up, down, left, right, up/right, up/left, down/right, down/left.
Joystick Axis
Axis
Axis Number
Specifies the axis (1 or 2)
Axis Threshold
Threshold at which joystick fires (Range 0 - 32768)
Axis Direction specifies the direction to use:
(Axis Number = 1) Joystick Left, Right, Up, Down
(Axis Number = 2) Paddle upper (Left); paddle Lower (Right); Joystick twist left (Up) Joystick twist right (Down)
Joystick Button
Button
Specify the button number to use.