Using XINPUTDOTNET we can put controller shake into a Unity project.
To set the controller you want to shake use this code:
PlayerIndex playerIndexOne = PlayerIndex.One; // sets first controller
PlayerIndex playerIndexTwo = PlayerIndex.Two; // sets second controller
GamePad.SetVibration(playerIndexOne, .1f, .1f); // shakes first controller
GamePad.SetVibration(playerIndexTwo, .1f, .1f); // shakes second controller
Thanks for watching!
On this page of the site you can watch the video online UNITY TUTORIAL Controller Vibration/Rumble/Shake EASY with a duration of hours minute second in good quality, which was uploaded by the user Simple Systems Studios 27 January 2020, share the link with friends and acquaintances, this video has already been watched 16,726 times on youtube and it was liked by 276 viewers. Enjoy your viewing!