I noticed the joystick class only allowed one motor to rumble, so I tried to use JInput directly, I dont feel any difference in my hands, just as if only the right motor was turning (also it does not turns smoothly, it feels jerky)
I tested the gamepad with the control pannel tester, and both motors work, so I am wondering if JInput really works at all
ControllerEnvironment cEnvironment = ControllerEnvironment.getDefaultEnvironment();
Controller[] cControllers = cEnvironment.getControllers();
if (cControllers.length>0)
{
for (int i = 0; i < cControllers.length; i++)
{
if (cControllers[i].getType() == Controller.Type.GAMEPAD)
{
System.out.println ("Controller Name: " + cControllers[i].getName()+" Type: " + (cControllers[i].getType())+" Rumble: " + ((cControllers[i].getRumblers().length > 0) ? "Yes" : "No"));
for (int o = 0; o < cControllers[i].getRumblers().length; o++)
{
System.out.println ("- Rumbling Axis: " + cControllers[i].getRumblers()[o].getAxisName());
cControllers[i].getRumblers()[o].rumble(1.0f);
Thread.Sleep(5000);
cControllers[i].getRumblers()[o].rumble(0.0f);
Thread.Sleep(2000);
}
}
}
}
I saw the post when it was on the other thread, too… I think none of us know much about JInput issues which is why it wasn’t answered there.
I don’t know if JInput has a forum or mailing list or whatever… but it might be worth checking. Not sure any of us will be able to help here as we are just JInput users… and not even very aware users.
already checked, not beeing updated since 2013, wondered if JInput was still maintained…
well thought it was better to create a fresh thread, let’s hope someone had the same problem …
As an additional note, on some gamepads the rumblers don’t work at all (xbox controller i think was one of them). And for linux it think it was required to manually set some permissions.