Add wrapping MouseBehavior

Right now, Roblox offers Default, LockCenter and LockCurrentPosition mouse modes via UserInputService.MouseBehavior. The latter two are useful when implementing actions where large mouse motions may be required, which would otherwise collide with the edge of the window.

Unfortunately, they also discard the motion of the mouse cursor in the process, locking the cursor to a single position. This desynchronises the position of the mouse cursor and the position of the physical mouse on the desk, meaning the user may have to pick up and readjust their mouse after having travelled enough distance.

Consider this common interaction of chaining together multiple mouse drags to orbit a camera around an object. The travel between motions causes the cursor to fall off the window:

Now consider the equivalent interaction in Blender, which does not lock the cursor:

This should show that locking the mouse is not a complete solution to allow for unbounded mouse movement.

I propose that Roblox introduce a Wrap mouse mode which, instead of locking the mouse cursor to one position, merely keeps the mouse within the confines of the viewport by wrapping around at the edges.

Blender implements this to great effect:

This allows for unbounded mouse movement while keeping the mouse cursor position in sync with the user’s physical mouse position on the desk. This means the user does not have to adjust their mouse after every interaction.

21 Likes

Roblox could definitely make this happen on the Windows platform, but it causes worry about certain SDKs that may not support such a feature to change the absolute mouse position on other platforms.

Regardless, I support this feature.

This would be pretty helpful in games such as Arsenal. Having to move my mouse all the way back to the original position hinders my abilities.

(wrong reply)

Wrapping is very interesting. I’ve never used a tool or played a game that did this before. Initially I thought that this request was to add solid bounds to the screen, such as in RTS games where you bump the edges of the screen to move the view.

Which was actually a feature in Roblox for a while! It was removed at the time PlayerScripts such as the CameraModule were added.