Skip to main content

ActiveCast

An ActiveCast represents a bullet fired by a parent Caster. It contains methods of accessing the physics data of this specific bullet at any given time, as well as methods to alter its trajectory during runtime.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Creates a new ActiveCast instance with the given parameters.\nDon't use this method! Instead, use [Caster:RaycastFire()](TypeDefinitions#Caster) to create ActiveCasts.",
            "params": [
                {
                    "name": "BaseCast",
                    "desc": "The base cast data used to initialize the active cast.",
                    "lua_type": "TypeDef.BaseCastData"
                },
                {
                    "name": "activeCastID",
                    "desc": "Unique identifier for this active cast.",
                    "lua_type": "string"
                },
                {
                    "name": "origin",
                    "desc": "The starting position of the cast.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "direction",
                    "desc": "The direction the cast will travel in.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "velocity",
                    "desc": "The velocity of the cast (either directional or scalar).",
                    "lua_type": "Vector3 | number"
                },
                {
                    "name": "behavior",
                    "desc": "The FastCast behavior configuration.",
                    "lua_type": "TypeDef.FastCastBehavior"
                },
                {
                    "name": "eventModule",
                    "desc": "The event module to use for this cast.",
                    "lua_type": "TypeDef.FastCastEventsModule"
                }
            ],
            "returns": [
                {
                    "desc": "The newly created ActiveCastCompement.",
                    "lua_type": "ActiveCastCompement"
                }
            ],
            "function_type": "static",
            "private": true,
            "source": {
                "line": 686,
                "path": "src/FastCast2/ActiveCast.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "ActiveCast",
    "desc": "An ActiveCast represents a bullet fired by a parent [Caster](Caster). It contains methods of accessing the physics \ndata of this specific bullet at any given time, as well as methods to alter its trajectory during runtime.",
    "source": {
        "line": 45,
        "path": "src/FastCast2/ActiveCast.luau"
    }
}