lovr.headset.vibrate

Causes the device to vibrate with a custom strength, duration, and frequency, if possible.

vibrated = lovr.headset.vibrate(device, strength, duration, frequency)

Arguments

NameTypeDefaultDescription
deviceDevice'head' The device to vibrate.
strengthnumber1 The strength of the vibration (amplitude), between 0 and 1.
durationnumber.5 The duration of the vibration, in seconds.
frequencynumber0 The frequency of the vibration, in hertz. 0 will use a default frequency.

Returns

NameTypeDescription
vibratedboolean Whether the vibration was successfully triggered by an active headset driver.

See also