Skip to main content

InputObjectRayUtils

Utility functions for constructing rays from input objects

Functions

cameraRayFromInputObject

InputObjectRayUtils.cameraRayFromInputObject(
inputObjectInputObject,
distancenumber,
offsetVector3 | Vector2 | nil,--

Optional

cameraCamera?--

Optional

) → Ray

Computes a camera ray from an inputObject

cameraRayFromMouse

InputObjectRayUtils.cameraRayFromMouse(
mouseMouse,
distancenumber,
offsetVector3 | Vector2 | nil,--

Optional

cameraCamera?--

Optional

) → Ray

Computes a camera ray from the mouse

cameraRayFromInputObjectWithOffset

InputObjectRayUtils.cameraRayFromInputObjectWithOffset(
inputObjectInputObject,
distancenumber?,--

Optional

offsetVector3 | Vector2,
cameraCamera?--

Optional

) → Ray

cameraRayFromScreenPosition

InputObjectRayUtils.cameraRayFromScreenPosition(
positionVector3 | Vector2,
distancenumber?,--

Optional

cameraCamera?--

Optional

) → Ray

cameraRayFromViewportPosition

InputObjectRayUtils.cameraRayFromViewportPosition(
positionVector3 | Vector2,
distancenumber?,--

Optional

cameraCamera?--

Optional

) → Ray

generateCircleRays

InputObjectRayUtils.generateCircleRays(
rayRay,
countnumber,
radiusnumber
) → {Ray}

Generates a circle of rays including the center ray

Show raw api
{
    "functions": [
        {
            "name": "cameraRayFromInputObject",
            "desc": "Computes a camera ray from an inputObject",
            "params": [
                {
                    "name": "inputObject",
                    "desc": "",
                    "lua_type": "InputObject"
                },
                {
                    "name": "distance",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "offset",
                    "desc": "Optional",
                    "lua_type": "Vector3 | Vector2 | nil"
                },
                {
                    "name": "camera",
                    "desc": "Optional",
                    "lua_type": "Camera?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ray"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/inputobjectutils/src/Client/InputObjectRayUtils.lua"
            }
        },
        {
            "name": "cameraRayFromMouse",
            "desc": "Computes a camera ray from the mouse",
            "params": [
                {
                    "name": "mouse",
                    "desc": "",
                    "lua_type": "Mouse"
                },
                {
                    "name": "distance",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "offset",
                    "desc": "Optional",
                    "lua_type": "Vector3 | Vector2 | nil"
                },
                {
                    "name": "camera",
                    "desc": "Optional",
                    "lua_type": "Camera?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ray"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 36,
                "path": "src/inputobjectutils/src/Client/InputObjectRayUtils.lua"
            }
        },
        {
            "name": "cameraRayFromInputObjectWithOffset",
            "desc": "",
            "params": [
                {
                    "name": "inputObject",
                    "desc": "",
                    "lua_type": "InputObject"
                },
                {
                    "name": "distance",
                    "desc": "Optional",
                    "lua_type": "number?"
                },
                {
                    "name": "offset",
                    "desc": "",
                    "lua_type": "Vector3 | Vector2"
                },
                {
                    "name": "camera",
                    "desc": "Optional",
                    "lua_type": "Camera?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ray"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 53,
                "path": "src/inputobjectutils/src/Client/InputObjectRayUtils.lua"
            }
        },
        {
            "name": "cameraRayFromScreenPosition",
            "desc": "",
            "params": [
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "Vector3 | Vector2"
                },
                {
                    "name": "distance",
                    "desc": "Optional",
                    "lua_type": "number?"
                },
                {
                    "name": "camera",
                    "desc": "Optional",
                    "lua_type": "Camera?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ray"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 69,
                "path": "src/inputobjectutils/src/Client/InputObjectRayUtils.lua"
            }
        },
        {
            "name": "cameraRayFromViewportPosition",
            "desc": "",
            "params": [
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "Vector3 | Vector2"
                },
                {
                    "name": "distance",
                    "desc": "Optional",
                    "lua_type": "number?"
                },
                {
                    "name": "camera",
                    "desc": "Optional",
                    "lua_type": "Camera?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ray"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 83,
                "path": "src/inputobjectutils/src/Client/InputObjectRayUtils.lua"
            }
        },
        {
            "name": "generateCircleRays",
            "desc": "Generates a circle of rays including the center ray",
            "params": [
                {
                    "name": "ray",
                    "desc": "",
                    "lua_type": "Ray"
                },
                {
                    "name": "count",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "radius",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ Ray }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 98,
                "path": "src/inputobjectutils/src/Client/InputObjectRayUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "InputObjectRayUtils",
    "desc": "Utility functions for constructing rays from input objects",
    "source": {
        "line": 5,
        "path": "src/inputobjectutils/src/Client/InputObjectRayUtils.lua"
    }
}