Skip to main content

HeadSystem

This item only works when running on the client. Client

Handles Motor6D objects to control neck rotations.

Functions

setCustomHeadOffset

HeadSystem.setCustomHeadOffset(headOffsetnumber?) → ()

Sets a custom offset for the head. By default the system can handle R6 and R15 rigs automatically however when using custom rigs then you can use this function to set a custom offset. If headoffset defualt behaviour is restored.

setBounds

HeadSystem.setBounds(
lowernumber?,
uppernumber?
) → ()

Sets the clamping values of how far the head can look up and down. Set to nil for default behaviour.

calculateLookAngles

HeadSystem.calculateLookAngles(
cameraCFrameCFrame,
rootCFrameCFrame
) → (
number,
number
)

Calculates the head look angles from the given cameraCFrame in relation to the rootCFrame.

updateLookAngles

HeadSystem.updateLookAngles(
characterModel,
yAnglenumber,
xAnglenumber
) → ()

Updates the head rotation for the character, the yAngle and xAngle should be normalized and everything before being passed into this function.

Show raw api
{
    "functions": [
        {
            "name": "setCustomHeadOffset",
            "desc": "Sets a custom offset for the head. By default the system can handle R6 and R15 rigs automatically however when using\ncustom rigs then you can use this function to set a custom offset. If `headoffset` defualt behaviour is restored.",
            "params": [
                {
                    "name": "headOffset",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 46,
                "path": "packages/lifelikeCharactersService/source/modules/HeadSystem.luau"
            }
        },
        {
            "name": "setBounds",
            "desc": "Sets the clamping values of how far the head can look up and down. Set to nil for default behaviour.",
            "params": [
                {
                    "name": "lower",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "upper",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 53,
                "path": "packages/lifelikeCharactersService/source/modules/HeadSystem.luau"
            }
        },
        {
            "name": "calculateLookAngles",
            "desc": "Calculates the head look angles from the given `cameraCFrame` in relation to the `rootCFrame`.",
            "params": [
                {
                    "name": "cameraCFrame",
                    "desc": "",
                    "lua_type": "CFrame"
                },
                {
                    "name": "rootCFrame",
                    "desc": "",
                    "lua_type": "CFrame"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 60,
                "path": "packages/lifelikeCharactersService/source/modules/HeadSystem.luau"
            }
        },
        {
            "name": "updateLookAngles",
            "desc": "Updates the head rotation for the `character`, the `yAngle` and `xAngle` should be normalized and everything before\nbeing passed into this function.",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "yAngle",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "xAngle",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 71,
                "path": "packages/lifelikeCharactersService/source/modules/HeadSystem.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "HeadSystem",
    "desc": "Handles [Motor6D] objects to control neck rotations.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 40,
        "path": "packages/lifelikeCharactersService/source/modules/HeadSystem.luau"
    }
}