Skip to main content

HapticFeedbackUtils

Utility functions involving haptic feedback on gamepads.

Functions

smallVibrate

HapticFeedbackUtils.smallVibrate(
userInputTypeUserInputType,
lengthnumber,
amplitudenumber
) → ()

Provides a small vibration.

setSmallVibration

HapticFeedbackUtils.setSmallVibration(
userInputTypeUserInputType,
amplitudenumber
) → boolean

Sets the small vibrators on the gamepad

setLargeVibration

HapticFeedbackUtils.setLargeVibration(
userInputTypeUserInputType,
amplitudenumber
) → boolean

Sets the large vibrators on the gamepad

setVibrationMotor

HapticFeedbackUtils.setVibrationMotor(
userInputTypeUserInputType,
vibrationMotorVibrationMotor,
amplitudenumber,
...number--

vibrationValues

) → boolean

Sets the small vibrators on the gamepad

Show raw api
{
    "functions": [
        {
            "name": "smallVibrate",
            "desc": "Provides a small vibration.",
            "params": [
                {
                    "name": "userInputType",
                    "desc": "",
                    "lua_type": "UserInputType"
                },
                {
                    "name": "length",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "amplitude",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 17,
                "path": "src/hapticfeedbackutils/src/Client/HapticFeedbackUtils.lua"
            }
        },
        {
            "name": "setSmallVibration",
            "desc": "Sets the small vibrators on the gamepad",
            "params": [
                {
                    "name": "userInputType",
                    "desc": "",
                    "lua_type": "UserInputType"
                },
                {
                    "name": "amplitude",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 34,
                "path": "src/hapticfeedbackutils/src/Client/HapticFeedbackUtils.lua"
            }
        },
        {
            "name": "setLargeVibration",
            "desc": "Sets the large vibrators on the gamepad",
            "params": [
                {
                    "name": "userInputType",
                    "desc": "",
                    "lua_type": "UserInputType"
                },
                {
                    "name": "amplitude",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 46,
                "path": "src/hapticfeedbackutils/src/Client/HapticFeedbackUtils.lua"
            }
        },
        {
            "name": "setVibrationMotor",
            "desc": "Sets the small vibrators on the gamepad",
            "params": [
                {
                    "name": "userInputType",
                    "desc": "",
                    "lua_type": "UserInputType"
                },
                {
                    "name": "vibrationMotor",
                    "desc": "",
                    "lua_type": "VibrationMotor"
                },
                {
                    "name": "amplitude",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "...",
                    "desc": "vibrationValues",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 60,
                "path": "src/hapticfeedbackutils/src/Client/HapticFeedbackUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "HapticFeedbackUtils",
    "desc": "Utility functions involving haptic feedback on gamepads.",
    "source": {
        "line": 5,
        "path": "src/hapticfeedbackutils/src/Client/HapticFeedbackUtils.lua"
    }
}