Rumble in game control plus

okay so in the game control plus library there are functions for rumble : (http://lagers.org.uk/gamecontrol/ref/classorg_1_1gamecontrolplus_1_1_control_device.html)
but somehow I can’t see any of them with the getNumberOfRumblers() function, it just returns 0.
also found this: https://forum.processing.org/two/discussion/10349/gamecontrolplus-send-a-value-to-a-joystick
where @quark says it’s not possible to send data to the joystick?
but then why are the rumbler-functions in game control plus and why can’t i at least see them?

Code just in case:

import net.java.games.input.*;
import org.gamecontrolplus.*;
import org.gamecontrolplus.gui.*;

ControlIO control;
ControlDevice stick;


void setup() {
  control = ControlIO.getInstance(this);
  stick = control.getMatchedDevice("xbox controller config");
  if (stick == null) {
    println("no controller found");
    System.exit(-1);
  }
}

void draw() {
  int nRumble = stick.getNumberOfRumblers();
  println(nRumble);                                  //returns 0
stick.rumble(100);                                   //does nothing..

}

1 Like

As the website says this library is based on an abandoned Processing 2 library, so I added some enhancements and made it work in Processing 3 but kept the original API which includes getNumberOfRumblers() and rumble().

If your stick has rumblers and getNumberOfRumblers() returns zero then I can’t do anything about it because the core of the original library is based on JInput and some OS specific system files, both of which are ancient and neither of which I have the resources to modify.

Sorry about that.

BTW if stick.getNumberOfRumblers() returns zero then you wouldn’t expect stick.rumble(100) to work. :thinking:

1 Like