-
Notifications
You must be signed in to change notification settings - Fork 16
DirectInputService
- Deprecated This has been replaced by XInputService. Uses the Microsoft DirectInput component of the DirectX 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.
- 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. These 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.
-
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
: Analog Trigger (+left, -right)
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) -
Special Button 1
: Select -
Special Button 2
: Start -
Special Button 3
: PS Button -
'ExtraDataFloat 4': Analog Trigger (L2) (+left, -right)
The following button flags correspond to Xbox360 controller buttons.
-
Button 1
: A -
Button 2
: B -
Button 3
: X -
Button 4
: Y -
Button 5
: Left Shoulder Button (LB) -
Button 6
: Right Shoulder Button (RB) -
Special Button 1
: Back -
Special Button 2
: Start -
Special Button 3
: Not Currently Assigned -
ExtraDataFloat 4
: Analog Trigger (LT) (0.0 to 1.0) -
ExtraDataFloat 4
: Analog Trigger (RT) (-1.0 to 0.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)