- Home /
Question by
Doghelmer · Mar 05, 2016 at 12:26 AM ·
xboxcontrollerxbox controllervibrationminimizevibrate
How to stop controller vibration on minimize
I'm using the XInputDotNet plugin for Unity to control vibration in my controller. I've found that if the controller is in a vibrating state and I minimize the game, it will continue to vibrate indefinitely. I'm not aware of any way to run a piece of code "on minimize".. Wondering if there's actually a solution to this bug?
Comment
Best Answer
Answer by Eno-Khaon · Mar 05, 2016 at 12:49 AM
Have you tried stopping/preventing vibration using OnApplicationFocus()? You should potentially be able to use a global value to determine whether the controller is or isn't allowed to vibrate through there.
Ah, that's exactly what I was looking for, just didn't know what it was called. Thanks!