Skip to content

raylib.MatrixPerspective

JoeStrout edited this page Nov 16, 2026 · 3 revisions

Get perspective projection matrix; fovY is the vertical field of view in radians

Parameters

Parameter Default Value Note
fovY 45.0 * DEG2RAD
aspect 1
nearPlane 0.01
farPlane 1000

Return value

Condition Return Value
(always) map

Notes

Example

// 60-degree field-of-view perspective with 16:9 aspect ratio
fovY = 60 * (pi / 180)
proj = raylib.MatrixPerspective(fovY, 16/9, 0.1, 1000)

Clone this wiki locally