Skip to content

raylib.MatrixPerspective

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get perspective projection matrix NOTE: Fovy angle must be provided 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