Skip to main content
Participant
September 28, 2015
Question

Multiple Game Input Controllers

  • September 28, 2015
  • 0 replies
  • 181 views

I've been trying to get multiple game controllers to work in my game.

It works great when only one game controller is used.  However when trying to use multiple controllers, a single control will trigger for every controller, essentially allowing one person to play as every player.

Calling device.getControlAt(0) will say that the control is triggered for every device.  Checking control.device will return the correct device, but the value will be changed for every control.  The only help I can seem to find is here:

To identify individual devices:

  1. Add event listeners to every control on all undetected input devices. These listeners listen for Event.CHANGE events, which are dispatched whenever a control value changes.
  2. The first time a control is activated (for example a button press or trigger pull), the application labels that device.
  3. Remove all of the event listeners from the remaining undetected input devices.

Repeat steps 1-3, as required, to identify the remaining undetected input devices.

This doesn't make any sense to me.  The devices are detected, all the controls just seem to be linked.  Any help is much appreciated.

This topic has been closed for replies.