-
Notifications
You must be signed in to change notification settings - Fork 16
XInputService
Last revision: ver. 5.0 - 19 November 2013
Uses the Microsoft XInput API to access game controllers. Supports Xbox 360 controllers using the USB Xbox360 Wireless Receiver for Windows and PlayStation 3 Sixaxis, Move, and Navigation Controllers via bluetooth and MotioninJoy (Using the Xbox 360 emulator).
- Service type: Controller
-
Event types:
Update
,Down
,Up
- Event data fields: flags for digital buttons and extra data (float array) for analog inputs
These fields are the same for Xbox 360 and PS3 controllers. Analog values floats are normalized (0.0 to 1.0) or (-1.0 to 0.0) depending which axis the data corresponds to. The PS3 Navigation controller uses the left analog stick and left analog trigger.
-
ButtonUp
: D-pad Up -
ButtonRight
: D-pad Right -
ButtonDown
: D-pad Down -
ButtonLeft
: D-pad Left -
ExtraDataFloat 0
: Left Analog Stick (-left, +right) -
ExtraDataFloat 1
: Left Analog Stick (-up, +down) -
ExtraDataFloat 2
: Right Analog Stick (-left, +right) -
ExtraDataFloat 3
: Right Analog Stick (-up, +down) -
ExtraDataFloat 4
: Left Analog Trigger (0.0 to 1.0) -
ExtraDataFloat 5
: Right Analog Trigger (0.0 to 1.0)
The following button flags correspond to PS3 controller buttons. Some controllers such as the Move or Navigation may not have all buttons available.
-
Button 1
: Triangle -
Button 2
: Circle -
Button 3
: Cross -
Button 4
: Square -
Button 5
: Left Shoulder Button (L1) -
Button 6
: Left Analog Stick Button (L3) -
Button 7
: Left Analog Trigger ( Value > 0.5 ) (L2) -
Button 8
: Right Shoulder Button (R1) -
Button 9
: Right Analog Stick Button (R3) -
Special Button 1
: Select -
Special Button 2
: Start -
Special Button 3
: Not Currently Assigned -
ExtraDataFloat 4
: Left Analog Trigger (L2) (0.0 to 1.0) -
ExtraDataFloat 5
: Right Analog Trigger (R2) (0.0 to 1.0)
The following button flags correspond to Xbox360 controller buttons.
-
Button 1
: Y -
Button 2
: B -
Button 3
: A -
Button 4
: X -
Button 5
: Left Shoulder Button (LB) -
Button 6
: Left Thumb Button -
Button 7
: Left Analog Trigger ( Value > 0.5 ) (L2) -
Button 8
: Right Shoulder Button (RB) -
Button 9
: Right Thumb Button -
Special Button 1
: Back -
Special Button 2
: Start -
Special Button 3
: Not Currently Assigned -
ExtraDataFloat 4
: Left Analog Trigger (LT) (0.0 to 1.0) -
ExtraDataFloat 5
: Right Analog Trigger (RT) (0.0 to 1.0)
-
updateInterval (float)
: the delay time in seconds between polling for new data (default: 0.01) -
checkControllerInterval (float)
: the delay time in seconds between checking for new controllers (default: 2.0)