Skip to content
Arthur Nishimoto edited this page Aug 1, 2013 · 6 revisions

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).

Generated events

  • Service type: Controller
  • Event types: Update, Down, Up
  • Event data fields: flags for digital buttons and extra data (float array) for analog inputs

Common Analog Fields

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)

PS3 Controller Specific Fields

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)

  • Special Button 1: Not Currently Assigned

  • Special Button 2: Not Currently Assigned

  • Special Button 3: Not Currently Assigned

  • ExtraDataFloat 4: Left Analog Trigger (L2) (+left, -right)

Xbox360 Controller Specific Fields

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)

  • Special Button 1: Not Currently Assigned

  • Special Button 2: Not Currently Assigned

  • Special Button 3: Not Currently Assigned

  • ExtraDataFloat 4: Left Analog Trigger (LT) (0.0 to 1.0)

  • ExtraDataFloat 4: Right Analog Trigger (RT) (-1.0 to 0.0)

Configuration parameters

  • 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)
Clone this wiki locally