Skip to main content

getGroundPlane

Function that uses raycasting to determine the groundplane in Roblox.

Functions

getGroundPlane

getGroundPlane.getGroundPlane(
basisVector3,
radiusnumber,
lengthnumber,
sampleCountnumber,
ignoreFunc(Instance) → boolean
) → (
Vector3,--

position

Vector3--

normal

)

Uses -y as the direction

Searchs for a groundPlane given a basis. Useful for planting a object in 3D space on terrain.

warning

ignoreFunc REALLY SHOULD NOT YIELD

Show raw api
{
    "functions": [
        {
            "name": "getGroundPlane",
            "desc": "Uses -y as the direction\n\nSearchs for a groundPlane given a basis. Useful for planting a object\nin 3D space on terrain.\n\n:::warning\nignoreFunc REALLY SHOULD NOT YIELD\n:::",
            "params": [
                {
                    "name": "basis",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "radius",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "length",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "sampleCount",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "ignoreFunc",
                    "desc": "",
                    "lua_type": "(Instance) -> boolean"
                }
            ],
            "returns": [
                {
                    "desc": "position",
                    "lua_type": "Vector3"
                },
                {
                    "desc": "normal",
                    "lua_type": "Vector3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 94,
                "path": "src/getgroundplane/src/Shared/getGroundPlane.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "getGroundPlane",
    "desc": "Function that uses raycasting to determine the groundplane in Roblox.",
    "source": {
        "line": 5,
        "path": "src/getgroundplane/src/Shared/getGroundPlane.lua"
    }
}