I’d love to have a way to be able to lock the mouse in the 3D view, similar to how MouseBehaviour can lock the mouse in place. Main use case for me would be viewport scrolling when moving the mouse at the window boundaries on PC.
This’d allow freely moving the mouse around in the window, but when it exits the window boundary, it is placed back at the boundary of the window. (Utility events firing whenever the mouse is very close to the window border (and whenever this ends) could be a nice addition too additional to the mouse window lock.)
That would allow me to do some really neat stuff like 3DS Max’s scrollbar which has the arrows attached to the scrollbar as opposed to the edges of the scrolling frame (UX nightmare), but wouldn’t this cause issues with moving the player’s mouse to something they didn’t want to click (e.g. “Yes purchase” instead of “No do not purchase”)? It would have to be disabled while the ROBLOX menu or any core prompts are open (like the purchase prompt). This would also cause issues because any time someone sent you a friend request your mouse setting code would temporarily stop.
Doesn’t it already unlock the mouse with coregui prompts? Stuff like purchase dialogs and the esc menu. I doubt it does it for stuff like friend requests, that’d be a problem in the current situation too.
Locking the mouse to the center of the screen or the current position can prevent you from accepting friend requests, but it can’t force you to accept one.
Oh like that.
I wouldn’t really regard that as a showstopper in any way (do you want the friendship badge that bad?!), but I see where you’re coming from now.
Being unable to accept friend requests is not a showstopper. Me joining a game, receiving a friend request, and then having it force-accepted for me is.
I do simply not see why you would want to force someone to accept a friend request that badly (even though you could still ESC out of it). Either way, I’m certain Roblox engineers can sort that sort of stuff out if this is being pulled though .
void PlayerMouse::SetPosition(Vector2 absolutePosition) would be great, as long as it respects the same constraints that locking the mouse to the center does to avoid the forcing purchasing. However:
Purchase prompt is very intentionally animated
Purchases are held for 3 days for a reason
Games that abuse this will quickly be reported
Considerations for unlocking mouse position must also be held.