Mouse behaviour cannot be set to LockCenter if starting in a small window

Greetings,

I have discovered a bug within the Roblox engine which is proving problematic and does not seem to have a solution or satisfactory workaround that I can find. I also haven’t found any existing threads on it… surprising since it is very easy to replicate and is present in both the Roblox client and Studio.

The bug is essentially that if you start an experience with a small enough window, it becomes impossible to lock the player mouse to the center of the screen, either using UserInputService.MouseBehaviour or even by zooming into first person (see attached video). The viewport must have an X size of 640 or less for this to occur.

If the video doesn’t load, you can replicate it simply like so:

  • Open a new place in Studio
  • Resize the window as small as it will go (viewport X size <= 640)
  • Click “Play”
  • Zoom the camera into first person. The mouse will still move around the screen and the camera will not move with it.

Another notable trait of this bug is that in this state, the chat window will always extend into the middle of the screen, no matter how you resize the window:

Whether this is related as a potential cause, or just a coincidence, I don’t know. Turning chat gui off does not fix the mouse bug, though.

I first had reports of this bug in early February of this year. Since my vehicle scripts require the mouse to be locked to the center of the screen, it’s impossible to play my game with this bug and players have no choice but to restart with a bigger window size.

I just thought I would bring this bug to your attention. I do not expect there is a way to circumvent it at the moment, so it seems there is nothing else to do but wait and hope it gets fixed at some point.

Thank you for your attention, and have a good day.

Thanks for the report, I filed a ticket to our internal database and i’ll come back with updates when possible. Thanks for the additional information:).

2 Likes

I see that this thread is a year old, does this issue still occur for you? The video linked in the post appears to be broken now, so it’s hard to tell what the issue is.

I tried to reproduce it on Windows, and I found that the minimum resolution of the client window is 800x600. It will not allow resizing smaller than this. At this minimum size, the issue is not reproducible.

In Studio, the minimum window size is lower, but I don’t reproduce the issue there either.

1 Like

Hi, thanks for checking in again!

I’ve just checked and it does seem that this issue no longer occurs. It looks like the issue was fixed with the introduction of the new chat system a few months ago. On games still using old chat modules, the issue can still be replicated in Studio, but as the Roblox client now has a minimum size of 800x600 it shouldn’t be a problem for players regardless.

Thank you for your help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.