Skip to main content

HingeCFrameTrack

Rotates along a given axis at the given origin. Used for turntables, tilt tracks, etc. Also used for spinning/rotating cars.

Properties

axis

HingeCFrameTrack.axis: Enum.Axis

origin

HingeCFrameTrack.origin: CFrame

useNegativeAngle

HingeCFrameTrack.useNegativeAngle: boolean

If true, uses the negative of the given angle (position) when getting the CFrame.

useDegrees

This item is read only and cannot be modified. Read Only
HingeCFrameTrack.useDegrees: boolean

If true, assumes position is in degrees. If false, assumes position is in radians. Used when initializing.

length

This item is read only and cannot be modified. Read Only
HingeCFrameTrack.length: number

If useDegrees is false, value is math.pi * 2. Else, if useDegrees is true, value is 360 (as in 360 degrees)

isCircuited

This item is read only and cannot be modified. Read Only
HingeCFrameTrack.isCircuited: boolean

Value is always true as a circle is always a full circuit.

Functions

new

Constructor
HingeCFrameTrack.new(
axisEnum.Axis,
originCFrame,
useNegativeAngleboolean?,--

default = false

useDegreesboolean?--

default = false

) → HingeCFrameTrack

Constructor

fromInstance

Constructor
HingeCFrameTrack.fromInstance(instanceInstance) → HingeCFrameTrack

Creates from an Instance

Children

{
	Axis: StringValue, // value can be `X`, `Y`, or `Z`
	Origin: CFrameInstance?,
	UseNegativeAngle: BoolValue?,
	UseDegrees: BoolValue?,
}

getCFrame

HingeCFrameTrack:getCFrame(positionnumber) → CFrame

Returns the CFrame on the track at the given position

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructor",
            "params": [
                {
                    "name": "axis",
                    "desc": "",
                    "lua_type": "Enum.Axis"
                },
                {
                    "name": "origin",
                    "desc": "",
                    "lua_type": "CFrame"
                },
                {
                    "name": "useNegativeAngle",
                    "desc": "default = false",
                    "lua_type": "boolean?"
                },
                {
                    "name": "useDegrees",
                    "desc": "default = false",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "HingeCFrameTrack"
                }
            ],
            "function_type": "static",
            "tags": [
                "Constructor"
            ],
            "source": {
                "line": 81,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        },
        {
            "name": "fromInstance",
            "desc": "Creates from an Instance\n### Children\n```ts\n{\n\tAxis: StringValue, // value can be `X`, `Y`, or `Z`\n\tOrigin: CFrameInstance?,\n\tUseNegativeAngle: BoolValue?,\n\tUseDegrees: BoolValue?,\n}\n```",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "HingeCFrameTrack"
                }
            ],
            "function_type": "static",
            "tags": [
                "Constructor"
            ],
            "source": {
                "line": 130,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        },
        {
            "name": "getCFrame",
            "desc": "Returns the CFrame on the track at the given position",
            "params": [
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "CFrame"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 186,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "axis",
            "desc": "",
            "lua_type": "Enum.Axis",
            "source": {
                "line": 44,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        },
        {
            "name": "origin",
            "desc": "",
            "lua_type": "CFrame",
            "source": {
                "line": 47,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        },
        {
            "name": "useNegativeAngle",
            "desc": "If `true`, uses the negative of the given angle (position) when getting the CFrame.",
            "lua_type": "boolean",
            "source": {
                "line": 51,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        },
        {
            "name": "useDegrees",
            "desc": "If `true`, assumes position is in degrees.\nIf `false`, assumes position is in radians.\nUsed when initializing.",
            "lua_type": "boolean",
            "readonly": true,
            "source": {
                "line": 58,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        },
        {
            "name": "length",
            "desc": "If `useDegrees` is `false`, value is `math.pi * 2`.\nElse, if `useDegrees` is `true`, value is `360` (as in `360` degrees)",
            "lua_type": "number",
            "readonly": true,
            "source": {
                "line": 64,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        },
        {
            "name": "isCircuited",
            "desc": "Value is always `true` as a circle is always a full circuit.",
            "lua_type": "boolean",
            "readonly": true,
            "source": {
                "line": 69,
                "path": "src/shared/cframeTrack/Hinge.lua"
            }
        }
    ],
    "types": [],
    "name": "HingeCFrameTrack",
    "desc": "Rotates along a given axis at the given origin.\nUsed for turntables, tilt tracks, etc. Also used for spinning/rotating cars.",
    "source": {
        "line": 41,
        "path": "src/shared/cframeTrack/Hinge.lua"
    }
}