LockFirstPerson locks mouse cursor when Roblox window is not focused

Hello, when using CameraMode = LockFirstPerson in a Roblox experience, the Roblox client can lock the mouse cursor to the center of the screen even when the Roblox window does not have focus.

The issue appears to be related to the client-side camera/input handling. The mouse is captured by Roblox while another application is still focused, causing the cursor to become stuck in the center of the screen outside of the Roblox window.

Steps to reproduce:

  1. Create or join a Roblox experience that uses CameraMode = LockFirstPerson.
  2. Open another application (for example a browser or Discord) and keep it focused.
  3. Start or join the Roblox experience through the Roblox client.
  4. While Roblox is loading or running in the background, observe the mouse cursor behavior.
  5. The mouse cursor becomes locked to the center of the screen even though the Roblox client is not focused.
  6. Press Alt+Tab to switch to Roblox and then back to the other application. The mouse behavior returns to normal.

Expected behavior:

The Roblox client should only capture and lock the mouse cursor when the Roblox window has focus and the player is actively controlling the game.

Actual behavior:

The LockFirstPerson camera system captures the mouse while the Roblox client is not focused, causing the cursor to be locked outside of Roblox.

Additional information:

This issue occurs in the Roblox client only and does not appear to be related to Roblox Studio.

2 Likes

Hi!

We’ve rolled out a fix, so the foreground/background state should be detected more reliably now. Please, try again, and let us know if you still have this issue.

1 Like