Skip to main content

CameraInputUtils

Functions

getPanBy

CameraInputUtils.getPanBy(
panDeltaVector2,
sensivityVector2
) → Vector2

Computes the pan delta based on the given pan delta and sensitivity.

convertToPanDelta

CameraInputUtils.convertToPanDelta(vector3Vector3) → Vector2

Converts a Vector3 to a Vector2 for camera panning

getInversionVector

CameraInputUtils.getInversionVector(userGameSettingsUserGameSettings) → Vector2

Returns the inversion vector based on the user game settings.

invertSensitivity

CameraInputUtils.invertSensitivity(sensivityVector2) → Vector2

Inverts the sensitivity vector.

isPortraitMode

CameraInputUtils.isPortraitMode(aspectRationumber) → boolean

Returns true if in portrait mode, false otherwise.

getCappedAspectRatio

CameraInputUtils.getCappedAspectRatio(viewportSizeVector2) → number

Computes a capped aspect ratio based on the viewport size.

Show raw api
{
    "functions": [
        {
            "name": "getPanBy",
            "desc": "Computes the pan delta based on the given pan delta and sensitivity.",
            "params": [
                {
                    "name": "panDelta",
                    "desc": "",
                    "lua_type": "Vector2"
                },
                {
                    "name": "sensivity",
                    "desc": "",
                    "lua_type": "Vector2"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector2"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 18,
                "path": "src/camera/src/Client/Input/CameraInputUtils.lua"
            }
        },
        {
            "name": "convertToPanDelta",
            "desc": "Converts a Vector3 to a Vector2 for camera panning",
            "params": [
                {
                    "name": "vector3",
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector2"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 36,
                "path": "src/camera/src/Client/Input/CameraInputUtils.lua"
            }
        },
        {
            "name": "getInversionVector",
            "desc": "Returns the inversion vector based on the user game settings.",
            "params": [
                {
                    "name": "userGameSettings",
                    "desc": "",
                    "lua_type": "UserGameSettings"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector2"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 46,
                "path": "src/camera/src/Client/Input/CameraInputUtils.lua"
            }
        },
        {
            "name": "invertSensitivity",
            "desc": "Inverts the sensitivity vector.",
            "params": [
                {
                    "name": "sensivity",
                    "desc": "",
                    "lua_type": "Vector2"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector2"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 56,
                "path": "src/camera/src/Client/Input/CameraInputUtils.lua"
            }
        },
        {
            "name": "isPortraitMode",
            "desc": "Returns true if in portrait mode, false otherwise.",
            "params": [
                {
                    "name": "aspectRatio",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 65,
                "path": "src/camera/src/Client/Input/CameraInputUtils.lua"
            }
        },
        {
            "name": "getCappedAspectRatio",
            "desc": "Computes a capped aspect ratio based on the viewport size.",
            "params": [
                {
                    "name": "viewportSize",
                    "desc": "",
                    "lua_type": "Vector2"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 78,
                "path": "src/camera/src/Client/Input/CameraInputUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "CameraInputUtils",
    "desc": "",
    "source": {
        "line": 5,
        "path": "src/camera/src/Client/Input/CameraInputUtils.lua"
    }
}