Gamepad never stops to vibrate

I’m using

Gamepad.current.SetMotorSpeeds(0.1f, 0.1f);

The gamepad (XboxOne controller connected via USB) start to vibrate but never stops.

That’s by design. What’s happening there is akin to calling functions like XInputSetState, i.e. you put the gamepad into a certain state and it remains in that state until you change it.

We should probably force-stop all haptics when exiting play mode, though. And maybe automatically pause them when play mode is paused.

Oh thank you for your answer didn’t find anything in the doc about this behaviour.

You should have added another parameter for vibration time.

2 Likes

Hi I’m having the same issue, except that i’m calling gamepad.all[idOfTheGamepadItsTheCorrectOneIDoubleChecked].ResetHaptics();, but it’s still not working. i also tried .SetMotorSpeeds(0,0) but yet again, not working…
It seem like i can’t change the value of the motor speeds because i also tried with:

Gamepad.all[i].SetMotorSpeeds(0.1f, 0.1f);
Gamepad.all[i].SetMotorSpeeds(1,1);

And it’s vibrating very lightly.

Edit: This only happens with the DualShock 4 controller (works fine with the XBox One controller)

I am from 11 years in the future. I’m stumbling upon this bug in unity 2022.3 and this is the only thing I could find regarding this issue! Any idea why controller rumble (using Gamepad.current.SetMotorSpeeds) still doesn’t stop when play mode is off in the new input system?

It’s been 500 years and I’m still running into this issue, please add the one line of code that stops haptics when exiting play mode so I don’t have to restart unity when my code doesn’t work