Skip to main content

PushCamera

Like a rotated camera, except we end up pushing back to a default rotation. This same behavior is seen in Roblox vehicle seats

Properties

CameraState

This item is read only and cannot be modified. Read Only
PushCamera.CameraState: CameraState

The current state.

Functions

new

PushCamera.new() → PushCamera

Constructs a new PushCamera

RotateXY

PushCamera:RotateXY(
xzrotVectorVector2--

The delta rotation to apply

) → ()

StopRotateBack

PushCamera:StopRotateBack() → ()

Prevents the rotation back. You need to call this every frame you want to prevent rotation.

Reset

PushCamera:Reset() → ()

Resets to default position automatically

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new PushCamera",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "PushCamera"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 32,
                "path": "src/camera/src/Client/Effects/PushCamera.lua"
            }
        },
        {
            "name": "RotateXY",
            "desc": "",
            "params": [
                {
                    "name": "xzrotVector",
                    "desc": "The delta rotation to apply",
                    "lua_type": "Vector2"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 45,
                "path": "src/camera/src/Client/Effects/PushCamera.lua"
            }
        },
        {
            "name": "StopRotateBack",
            "desc": "Prevents the rotation back. You need to call this\nevery frame you want to prevent rotation.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 54,
                "path": "src/camera/src/Client/Effects/PushCamera.lua"
            }
        },
        {
            "name": "Reset",
            "desc": "Resets to default position automatically",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 61,
                "path": "src/camera/src/Client/Effects/PushCamera.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "CameraState",
            "desc": "The current state.",
            "lua_type": "CameraState",
            "readonly": true,
            "source": {
                "line": 106,
                "path": "src/camera/src/Client/Effects/PushCamera.lua"
            }
        }
    ],
    "types": [],
    "name": "PushCamera",
    "desc": "Like a rotated camera, except we end up pushing back to a default rotation.\nThis same behavior is seen in Roblox vehicle seats",
    "source": {
        "line": 7,
        "path": "src/camera/src/Client/Effects/PushCamera.lua"
    }
}