Skip to main content

WheelSpinPlugin

"Animates" wheels as the animation plays

Types

WHEEL_TAG_NAME

Tag
type WHEEL_TAG_NAME = "WHEEL_SPIN"

WHEEL_AXIS_ATTRIBUTE_NAME

Tag
type WHEEL_AXIS_ATTRIBUTE_NAME = "WheelAxis"

WHEEL_USE_NEGATIVE_ANGLE_ATTRIBUTE_NAME

Tag
type WHEEL_USE_NEGATIVE_ANGLE_ATTRIBUTE_NAME = "WheelIsAngleNegative"

WheelData

interface WheelData {
partBasePart
circumferencenumber
axisEnum.Axis
useNegativeboolean
}

Functions

new

Constructor
WheelSpinPlugin.new(
animPlayerModelAnimationPlayer,--

The animation player where the model and wheels are

currentSpeedAnimPlayerModelAnimationPlayer?--

The animation player whose currentSpeed is used

) → WheelSpinPlugin

addWheel

WheelSpinPlugin:addWheel(wheelBasePart) → ()

Adds a wheel to this plugin

update

WheelSpinPlugin:update(deltaTimenumber) → ()

Updates this plugin This is connected to ModelAnimationPlayer's onModelUpdated signal

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "",
            "params": [
                {
                    "name": "animPlayer",
                    "desc": "The animation player where the model and wheels are",
                    "lua_type": "ModelAnimationPlayer"
                },
                {
                    "name": "currentSpeedAnimPlayer",
                    "desc": "The animation player whose currentSpeed is used",
                    "lua_type": "ModelAnimationPlayer?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "WheelSpinPlugin"
                }
            ],
            "function_type": "static",
            "tags": [
                "Constructor"
            ],
            "source": {
                "line": 57,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        },
        {
            "name": "_removeModel",
            "desc": "Removes all wheels",
            "params": [
                {
                    "name": "_animModel",
                    "desc": "",
                    "lua_type": "AnimationModel"
                }
            ],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 89,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        },
        {
            "name": "_updateModel",
            "desc": "Updates the current model",
            "params": [],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 96,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        },
        {
            "name": "addWheel",
            "desc": "Adds a wheel to this plugin",
            "params": [
                {
                    "name": "wheel",
                    "desc": "",
                    "lua_type": "BasePart"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 121,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        },
        {
            "name": "update",
            "desc": "Updates this plugin\nThis is connected to ModelAnimationPlayer's onModelUpdated signal",
            "params": [
                {
                    "name": "deltaTime",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 171,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "WHEEL_TAG_NAME",
            "desc": "",
            "lua_type": "\"WHEEL_SPIN\"",
            "tags": [
                "Tag"
            ],
            "source": {
                "line": 13,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        },
        {
            "name": "WHEEL_AXIS_ATTRIBUTE_NAME",
            "desc": "",
            "lua_type": "\"WheelAxis\"",
            "tags": [
                "Tag"
            ],
            "source": {
                "line": 18,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        },
        {
            "name": "WHEEL_USE_NEGATIVE_ANGLE_ATTRIBUTE_NAME",
            "desc": "",
            "lua_type": "\"WheelIsAngleNegative\"",
            "tags": [
                "Tag"
            ],
            "source": {
                "line": 23,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        },
        {
            "name": "WheelData",
            "desc": "",
            "fields": [
                {
                    "name": "part",
                    "lua_type": "BasePart",
                    "desc": ""
                },
                {
                    "name": "circumference",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "axis",
                    "lua_type": "Enum.Axis",
                    "desc": ""
                },
                {
                    "name": "useNegative",
                    "lua_type": "boolean",
                    "desc": ""
                }
            ],
            "source": {
                "line": 37,
                "path": "src/shared/plugins/WheelSpinPlugin.lua"
            }
        }
    ],
    "name": "WheelSpinPlugin",
    "desc": "\"Animates\" wheels as the animation plays",
    "source": {
        "line": 48,
        "path": "src/shared/plugins/WheelSpinPlugin.lua"
    }
}