Skip to main content

SphereUtils

Utility functions involving spheres

Functions

intersectsRay

SphereUtils.intersectsRay(
sphereCenterVector3,
sphereRadiusnumber,
rayOriginVector3,
rayDirectionVector3
) → boolean

Determines whether the ray intersects with the sphere.

Show raw api
{
    "functions": [
        {
            "name": "intersectsRay",
            "desc": "Determines whether the ray intersects with the sphere.",
            "params": [
                {
                    "name": "sphereCenter",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "sphereRadius",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "rayOrigin",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "rayDirection",
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 17,
                "path": "src/geometryutils/src/Shared/SphereUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "SphereUtils",
    "desc": "Utility functions involving spheres",
    "source": {
        "line": 5,
        "path": "src/geometryutils/src/Shared/SphereUtils.lua"
    }
}