Skip to main content

GetPercentExposedUtils

Identify parts that are potentially exposed to an explosion using a random vector raycasting

Properties

RAY_COUNT

This item is read only and cannot be modified. Read Only
GetPercentExposedUtils.RAY_COUNT: number

Number of rays to use when searching

Functions

GetPercentExposedUtils.search(
pointVector3,--

Point to search

radiusnumber,
raycasterRaycaster?
) → {[BasePart]number}--

A table mapping parts to to percent exposure

Searches for percent exposure of all parts given.

Show raw api
{
    "functions": [
        {
            "name": "search",
            "desc": "Searches for percent exposure of all parts given.",
            "params": [
                {
                    "name": "point",
                    "desc": "Point to search",
                    "lua_type": "Vector3"
                },
                {
                    "name": "radius",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "raycaster",
                    "desc": "",
                    "lua_type": "Raycaster?"
                }
            ],
            "returns": [
                {
                    "desc": "A table mapping parts to to percent exposure",
                    "lua_type": "{ [BasePart]: number }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 30,
                "path": "src/getpercentexposedutils/src/Shared/GetPercentExposedUtils.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "RAY_COUNT",
            "desc": "Number of rays to use when searching",
            "lua_type": "number",
            "readonly": true,
            "source": {
                "line": 20,
                "path": "src/getpercentexposedutils/src/Shared/GetPercentExposedUtils.lua"
            }
        }
    ],
    "types": [],
    "name": "GetPercentExposedUtils",
    "desc": "Identify parts that are potentially exposed to an explosion using a random vector raycasting",
    "source": {
        "line": 5,
        "path": "src/getpercentexposedutils/src/Shared/GetPercentExposedUtils.lua"
    }
}