Skip to main content

CameraController

InternalController

An internal controller that helps out with camera-related stuff

CameraController = Axis.GetController("CameraController")

Functions

SetOffset

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
CameraController:SetOffset(Offsetvector3) → ()

Sets the player's camrea's offset.

info

Internally this sets the character's humanoid camera offset.

GetPlayerCamera

CameraController:GetPlayerCamera() → Camera

Returns the player's camera

Show raw api
{
    "functions": [
        {
            "name": "SetOffset",
            "desc": "Sets the player's camrea's offset.\n\n:::info\nInternally this sets the character's [humanoid camera offset](https://create.roblox.com/docs/reference/engine/classes/Humanoid#CameraOffset).\n:::",
            "params": [
                {
                    "name": "Offset",
                    "desc": "",
                    "lua_type": "vector3"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 29,
                "path": "Axis/Controllers/CameraController.luau"
            }
        },
        {
            "name": "GetPlayerCamera",
            "desc": "Returns the player's camera",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Camera"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 39,
                "path": "Axis/Controllers/CameraController.luau"
            }
        },
        {
            "name": "Start",
            "desc": "Gets needed controllers:\n- Player Controller",
            "params": [],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 49,
                "path": "Axis/Controllers/CameraController.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "CameraController",
    "desc": "An internal controller that helps out with camera-related stuff\n\n```lua\nCameraController = Axis.GetController(\"CameraController\")\n```",
    "tags": [
        "InternalController"
    ],
    "source": {
        "line": 13,
        "path": "Axis/Controllers/CameraController.luau"
    }
}