Skip to main content

GamepadRotateModel

Rotation model for gamepad controls that uses Roblox's curve smoothing and other components.

Functions

new

GamepadRotateModel.new() → GamepadRotateModel

Constructs a new GamepadRotateModel.

SetAcceleration

GamepadRotateModel:SetAcceleration(accelerationnumber) → ()

Sets the acceleration for the game rotate model. The higher the acceleration the more linear the gamepad rotate model feels.

tip

Set this to something high, like 2500, for an FPS. This makes control feel a lot better.

GetThumbstickDeltaAngle

GamepadRotateModel:GetThumbstickDeltaAngle() → Vector2

Gets the delta for the thumbstick

StopRotate

GamepadRotateModel:StopRotate() → ()

Stops rotation

HandleThumbstickInput

GamepadRotateModel:HandleThumbstickInput(inputObjectInputObject) → ()

Converts the thumbstick input into a smoothed delta based upon deadzone and other components.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new GamepadRotateModel.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "GamepadRotateModel"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "src/camera/src/Client/Controls/GamepadRotateModel.lua"
            }
        },
        {
            "name": "SetAcceleration",
            "desc": "Sets the acceleration for the game rotate model. The higher the acceleration\nthe more linear the gamepad rotate model feels.\n\n:::tip\nSet this to something high, like 2500, for an FPS. This makes control feel a lot better.\n:::",
            "params": [
                {
                    "name": "acceleration",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 44,
                "path": "src/camera/src/Client/Controls/GamepadRotateModel.lua"
            }
        },
        {
            "name": "GetThumbstickDeltaAngle",
            "desc": "Gets the delta for the thumbstick",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector2"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 55,
                "path": "src/camera/src/Client/Controls/GamepadRotateModel.lua"
            }
        },
        {
            "name": "StopRotate",
            "desc": "Stops rotation",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 66,
                "path": "src/camera/src/Client/Controls/GamepadRotateModel.lua"
            }
        },
        {
            "name": "HandleThumbstickInput",
            "desc": "Converts the thumbstick input into a smoothed delta based upon deadzone and other\ncomponents.",
            "params": [
                {
                    "name": "inputObject",
                    "desc": "",
                    "lua_type": "InputObject"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 83,
                "path": "src/camera/src/Client/Controls/GamepadRotateModel.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "GamepadRotateModel",
    "desc": "Rotation model for gamepad controls that uses Roblox's curve smoothing and other components.",
    "source": {
        "line": 6,
        "path": "src/camera/src/Client/Controls/GamepadRotateModel.lua"
    }
}