From 4edb34888a31e346a7153abb21bca300f72240fc Mon Sep 17 00:00:00 2001 From: James 'JT' Tumber <105913324+tumberino@users.noreply.github.com> Date: Fri, 22 Mar 2024 16:14:30 +0000 Subject: [PATCH 1/2] Lock the cursor to the window for first person camera --- examples/core/3d_camera_first_person.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/core/3d_camera_first_person.zig b/examples/core/3d_camera_first_person.zig index c049412..429400d 100644 --- a/examples/core/3d_camera_first_person.zig +++ b/examples/core/3d_camera_first_person.zig @@ -41,6 +41,7 @@ pub fn main() anyerror!void { } rl.setTargetFPS(60); // Set our game to run at 60 frames-per-second + rl.disableCursor(); // Lock the cursor to the window //-------------------------------------------------------------------------------------- // Main game loop From 694702b758d6a666a16e790a33be1d690046e8a4 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Tue, 26 Mar 2024 20:21:24 +0100 Subject: [PATCH 2/2] Update fps example to be more inline with raylib's version --- examples/core/3d_camera_first_person.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/core/3d_camera_first_person.zig b/examples/core/3d_camera_first_person.zig index 429400d..1d41bcf 100644 --- a/examples/core/3d_camera_first_person.zig +++ b/examples/core/3d_camera_first_person.zig @@ -40,8 +40,8 @@ pub fn main() anyerror!void { ); } + rl.disableCursor(); // Limit cursor to relative movement inside the window rl.setTargetFPS(60); // Set our game to run at 60 frames-per-second - rl.disableCursor(); // Lock the cursor to the window //-------------------------------------------------------------------------------------- // Main game loop