Matrix4x4.Perspective(number fov, number aspect, number zNear, number zFar)
Create a perspective projection matrix.
Parameters:
Name | Type | Description |
---|---|---|
fov | number | Vertical field-of-view in degrees. |
aspect | number | Aspect ratio (width divided by height). |
zNear | number | Near depth clipping plane value. |
zFar | number | Far depth clipping plane value. |
Returns:
type | Description |
---|---|
Matrix4x4 | The projection matrix. |
Usage
---@type number
local fov;
---@type number
local aspect;
---@type number
local zNear;
---@type number
local zFar;
local val0 = Matrix4x4:Perspective(fov, aspect, zNear, zFar)