Joystick:setVibration
Sets the vibration motor speeds on a Joystick with rumble support. Most common gamepads have this functionality, although not all drivers give proper support. Use Joystick:isVibrationSupported to check.
success = Joystick:setVibration( left, right )
left number Strength of the left vibration motor on the Joystick. Must be in the range of 1.
right number Strength of the right vibration motor on the Joystick. Must be in the range of 1.
success boolean True if the vibration was successfully applied, false if not.
success = Joystick:setVibration()
success boolean True if the vibration was successfully disabled, false if not.
success = Joystick:setVibration( left, right, duration )
left number Strength of the left vibration motor on the Joystick. Must be in the range of 1.
right number Strength of the right vibration motor on the Joystick. Must be in the range of 1.
duration (-1) number The duration of the vibration in seconds. A negative value means infinite duration.
success boolean True if the vibration was successfully applied, false if not.