Mouse moving off screen when NUI has focus

This probably got reported somewhere before, but I couldn’t find a report so I thought it’s worth a shot to bring this up.

If you have a multi-monitor setup and a NUI has focus the mouse can move off the screen.
For example: You have FiveM focused on your main screen and have a second screen on the right. If you move your mouse to the right border of your game window it doesn’t stop there but actually moves to the second screen.
This also happens if the mouse has no focus, making this really ‘annoying’ when moving your cam around (For reference, using: SetNuiFocus(true, false)).

Probably related bug:
If you have a multi-monitor setup and join a server the mouse also moves off the screen, even when no NUI has focus (normal gameview). You need to minimize and then refocus FiveM to stop this behavior from appearing.

This behavior is consistent on all screen type settings (exclusive, fullscreen, windowed) and mouse input settings.

I cannot remember when this issue started to occur (maybe existing since CEF got added?).

Hey, I have currrently the same problem. Interesting is, that only in some NUIs I’m getting that issue and not in all. Do you found a solution?

just remove the direct input option in the fivem mouse configuration

Unrelated to that bug.

Noticed that too. But it looks like its a newer bug because i never noticed it like a few months ago. So something changed.

2 Likes

Same here…im stock and i can’t move or do something unless my TxAdmin is open, only the F8 command work and that’s how i open the Tx…