Skip to main content

BaseCast

BaseCast is the underlying class that manages cast simulation, lifecycle, and movement modes. It is used internally by FastCastSerial and FastCastParallel.

Functions

Raycast

BaseCast:Raycast(
OriginVector3,--

The origin of the raycast.

DirectionVector3,--

The direction of the raycast.

VelocityVector3 | number,--

The velocity of the raycast.

BehaviorFastCastBehavior,--

The behavior data for the raycast.

GUIDstring--

The unique identifier for the raycast.

) → ()

Create a raycast.

SetFastCastEventsModule

BaseCast:SetFastCastEventsModule(
moduleScriptModuleScript--

The FastCastEventsModule to set.

) → ()

Blockcast

BaseCast:Blockcast(
OriginVector3,--

The origin of the blockcast.

SizeVector3,--

The size of the blockcast.

DirectionVector3,--

The direction of the blockcast.

VelocityVector3 | number,--

The velocity of the blockcast.

BehaviorFastCastBehavior--

The behavior data for the blockcast.

) → ()

Create a Blockcast.

Spherecast

BaseCast:Spherecast(
OriginVector3,--

The origin of the spherecast.

Radiusnumber,--

The radius of the spherecast.

DirectionVector3,--

The direction of the spherecast.

VelocityVector3 | number,--

The velocity of the spherecast.

BehaviorFastCastBehavior--

The behavior data for the spherecast.

) → ()

Create a Spherecast.

SetMovementModeEnabled

BaseCast:SetMovementModeEnabled(
mode"BulkMoveTo" | "Motor6D",--

The movement mode to set.

enabledboolean--

Whether to enable or disable the movement mode.

) → ()

Sets the movement mode for the casts. This determines how the cast's position is updated during simulation.

Destroy

BaseCast:Destroy() → ()

Destroys the BaseCast instance and cleans up resources.

Raycast

BaseCast:Raycast(
OriginVector3,--

The origin of the raycast.

DirectionVector3,--

The direction of the raycast.

VelocityVector3 | number,--

The velocity of the raycast.

BehaviorFastCastBehavior,--

The behavior data for the raycast.

GUIDstring--

The unique identifier for the raycast.

) → ()

Create a raycast.

Blockcast

BaseCast:Blockcast(
OriginVector3,--

The origin of the raycast.

SizeVector3,--

The size of the raycast.

DirectionVector3,--

The direction of the raycast.

VelocityVector3 | number,--

The velocity of the raycast.

BehaviorFastCastBehavior--

The behavior data for the raycast.

) → ()

Create a Blockcast.

Spherecast

BaseCast:Spherecast(
OriginVector3,--

The origin of the spherecast.

Radiusnumber,--

The radius of the spherecast.

DirectionVector3,--

The direction of the spherecast.

VelocityVector3 | number,--

The velocity of the spherecast.

BehaviorFastCastBehavior--

The behavior data for the spherecast.

) → ()

Create a Spherecast.

SetMovementModeEnabled

BaseCast:SetMovementModeEnabled() → ()
@param mode "BulkMoveTo" | "Motor6D" -- The movement mode to set.
@param enabled boolean -- Whether to enable or disable the movement mode.

Sets the movement mode for the casts. This determines how the cast's position is updated during simulation.

Destroy

BaseCast:Destroy() → ()

Destroys the BaseCast instance and cleans up resources.

Show raw api
{
    "functions": [
        {
            "name": "Raycast",
            "desc": "Create a raycast.",
            "params": [
                {
                    "name": "Origin",
                    "desc": "The origin of the raycast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Direction",
                    "desc": "The direction of the raycast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Velocity",
                    "desc": "The velocity of the raycast.",
                    "lua_type": "Vector3 | number"
                },
                {
                    "name": "Behavior",
                    "desc": "The behavior data for the raycast.",
                    "lua_type": "FastCastBehavior"
                },
                {
                    "name": "GUID",
                    "desc": "The unique identifier for the raycast.",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 174,
                "path": "src/BaseCastParallel.luau"
            }
        },
        {
            "name": "SetFastCastEventsModule",
            "desc": "",
            "params": [
                {
                    "name": "moduleScript",
                    "desc": "The FastCastEventsModule to set.",
                    "lua_type": "ModuleScript"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 211,
                "path": "src/BaseCastParallel.luau"
            }
        },
        {
            "name": "Blockcast",
            "desc": "Create a Blockcast.",
            "params": [
                {
                    "name": "Origin",
                    "desc": "The origin of the blockcast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Size",
                    "desc": "The size of the blockcast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Direction",
                    "desc": "The direction of the blockcast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Velocity",
                    "desc": "The velocity of the blockcast.",
                    "lua_type": "Vector3 | number"
                },
                {
                    "name": "Behavior",
                    "desc": "The behavior data for the blockcast.",
                    "lua_type": "FastCastBehavior"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 237,
                "path": "src/BaseCastParallel.luau"
            }
        },
        {
            "name": "Spherecast",
            "desc": "Create a Spherecast.",
            "params": [
                {
                    "name": "Origin",
                    "desc": "The origin of the spherecast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Radius",
                    "desc": "The radius of the spherecast.",
                    "lua_type": "number"
                },
                {
                    "name": "Direction",
                    "desc": "The direction of the spherecast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Velocity",
                    "desc": "The velocity of the spherecast.",
                    "lua_type": "Vector3 | number"
                },
                {
                    "name": "Behavior",
                    "desc": "The behavior data for the spherecast.",
                    "lua_type": "FastCastBehavior"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 282,
                "path": "src/BaseCastParallel.luau"
            }
        },
        {
            "name": "SetMovementModeEnabled",
            "desc": "Sets the movement mode for the casts. This determines how the cast's position is updated during simulation.",
            "params": [
                {
                    "name": "mode",
                    "desc": "The movement mode to set.",
                    "lua_type": "\"BulkMoveTo\" | \"Motor6D\""
                },
                {
                    "name": "enabled",
                    "desc": "Whether to enable or disable the movement mode.",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 323,
                "path": "src/BaseCastParallel.luau"
            }
        },
        {
            "name": "Destroy",
            "desc": "Destroys the BaseCast instance and cleans up resources.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 379,
                "path": "src/BaseCastParallel.luau"
            }
        },
        {
            "name": "Raycast",
            "desc": "Create a raycast.",
            "params": [
                {
                    "name": "Origin",
                    "desc": "The origin of the raycast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Direction",
                    "desc": "The direction of the raycast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Velocity",
                    "desc": "The velocity of the raycast.",
                    "lua_type": "Vector3 | number"
                },
                {
                    "name": "Behavior",
                    "desc": "The behavior data for the raycast.",
                    "lua_type": "FastCastBehavior"
                },
                {
                    "name": "GUID",
                    "desc": "The unique identifier for the raycast.",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 97,
                "path": "src/BaseCastSerial.luau"
            }
        },
        {
            "name": "Blockcast",
            "desc": "Create a Blockcast.",
            "params": [
                {
                    "name": "Origin",
                    "desc": "The origin of the raycast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Size",
                    "desc": "The size of the raycast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Direction",
                    "desc": "The direction of the raycast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Velocity",
                    "desc": "The velocity of the raycast.",
                    "lua_type": "Vector3 | number"
                },
                {
                    "name": "Behavior",
                    "desc": "The behavior data for the raycast.",
                    "lua_type": "FastCastBehavior"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 130,
                "path": "src/BaseCastSerial.luau"
            }
        },
        {
            "name": "Spherecast",
            "desc": "Create a Spherecast.",
            "params": [
                {
                    "name": "Origin",
                    "desc": "The origin of the spherecast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Radius",
                    "desc": "The radius of the spherecast.",
                    "lua_type": "number"
                },
                {
                    "name": "Direction",
                    "desc": "The direction of the spherecast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Velocity",
                    "desc": "The velocity of the spherecast.",
                    "lua_type": "Vector3 | number"
                },
                {
                    "name": "Behavior",
                    "desc": "The behavior data for the spherecast.",
                    "lua_type": "FastCastBehavior"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 166,
                "path": "src/BaseCastSerial.luau"
            }
        },
        {
            "name": "SetMovementModeEnabled",
            "desc": "\t@param mode \"BulkMoveTo\" | \"Motor6D\" -- The movement mode to set.\n\t@param enabled boolean -- Whether to enable or disable the movement mode.\n\n\tSets the movement mode for the casts. This determines how the cast's position is updated during simulation.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 199,
                "path": "src/BaseCastSerial.luau"
            }
        },
        {
            "name": "Destroy",
            "desc": "Destroys the BaseCast instance and cleans up resources.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 255,
                "path": "src/BaseCastSerial.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "BaseCast",
    "desc": "BaseCast is the underlying class that manages cast simulation, lifecycle, and movement modes.\nIt is used internally by FastCastSerial and FastCastParallel.",
    "source": {
        "line": 24,
        "path": "src/BaseCastSerial.luau"
    }
}