Skip to main content

CameraPyramidUtils

Functions

rayIntersection

CameraPyramidUtils.rayIntersection(
cameraCamera,
rayOriginVector3,
unitRayDirectionVector3,
debugMaidMaid?--

Optional debug maid

) → (
Vector3?,--

Screen point1

Vector3?--

Screen point2

)

Treating the camera like a pyramid, compute points on the screen that the ray intersects with the screen.

Returns the screen points in the same order as the ray orientation, such that the line is always moving away from the ray.

Show raw api
{
    "functions": [
        {
            "name": "rayIntersection",
            "desc": "Treating the camera like a pyramid, compute points on the screen that the ray intersects with the\nscreen.\n\nReturns the screen points in the same order as the ray orientation, such that the line is always\nmoving away from the ray.",
            "params": [
                {
                    "name": "camera",
                    "desc": "",
                    "lua_type": "Camera"
                },
                {
                    "name": "rayOrigin",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "unitRayDirection",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "debugMaid",
                    "desc": "Optional debug maid",
                    "lua_type": "Maid?"
                }
            ],
            "returns": [
                {
                    "desc": "Screen point1",
                    "lua_type": "Vector3?"
                },
                {
                    "desc": "Screen point2",
                    "lua_type": "Vector3?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 28,
                "path": "src/geometryutils/src/Shared/CameraPyramidUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "CameraPyramidUtils",
    "desc": "",
    "source": {
        "line": 4,
        "path": "src/geometryutils/src/Shared/CameraPyramidUtils.lua"
    }
}