Skip to content

raylib.UpdateCamera

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Update camera position for selected mode Camera mode: CAMERA_FREE, CAMERA_FIRST_PERSON, CAMERA_THIRD_PERSON, CAMERA_ORBITAL or CUSTOM

Parameters

Parameter Default Value Note
camera
mode CAMERA_CUSTOM

Return value

None.

Notes

Example

camera = {"position": [0, 10, 10], "target": [0, 0, 0], "up": [0, 1, 0], "fovy": 45, "projection": 0}
raylib.InitWindow 800, 600, "Camera"
while not raylib.WindowShouldClose
    raylib.UpdateCamera camera, raylib.CAMERA_FREE
    raylib.BeginDrawing
    raylib.ClearBackground raylib.RAYWHITE
    raylib.EndDrawing
end while
raylib.CloseWindow

Clone this wiki locally