Matrix4x4.Ortho(number left, number right, number bottom, number top, number zNear, number zFar)
Create an orthogonal projection matrix.
Parameters:
Name | Type | Description |
---|---|---|
left | number | Left-side x-coordinate. |
right | number | Right-side x-coordinate. |
bottom | number | Bottom y-coordinate. |
top | number | Top y-coordinate. |
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 left;
---@type number
local right;
---@type number
local bottom;
---@type number
local top;
---@type number
local zNear;
---@type number
local zFar;
local val0 = Matrix4x4:Ortho(left, right, bottom, top, zNear, zFar)
Extra Detail
The returned matrix, when used as a Camera's projection matrix, creates a projection of the area between left, right, top and bottom, with zNear and zFar as the near and far depth clipping planes into a cube going from (left, bottom, near) = (-1, -1, -1) to (right, top, far) = (1, 1, 1).