input_rumble_params table reference - Stingray Lua API Reference

input_rumble_params table reference

Description

This table provides settings for a new rumble effect.

You can create a table with any or all of these keys, and pass it in a call to [stingray.InputController.rumble_effect()] for types of input controllers that support rumble effects.

Note that for any key that you leave out of this table, the default value will be used. So you only need to specify the keys for which you want to set a different value.

Data Members

If omitted, the default value of 0 is used.

If omitted, the default value of 1 is used.

If omitted, the default value of 0 is used.

A frequency of 0 means that no sine wave will be used, and the strength of the rumble will only be affected by the ADSR envelope.

Note that since the motors on most controllers cannot change speed instantly, it does not make sense to use frequencies above approximately 6 Hz.

If omitted, the default value of 0 is used.

Normally the sine wave is offset so that it starts in its lowest position. You can specify a value between 0 and 1 to start the oscillation at a different position. For example, with a value of 0.5, the sine wave will start in its highest position.

If omitted, the default value of 0 is used.

You can use this value instead of the frequency if you want.

If omitted, the default value of #inf is used.

If omitted, the default value of 0 is used.

If omitted, the default value of 0 is used.

If omitted, the default value of 1 is used.