I’ve recently become interested in forcing the movement of the mouse into a box on my screen, To explain, I’ll use an example, aka this picture below. I can only move the red dot [ which is the mouse/cursor ] within the black box. No matter what, I can’t move the mouse within the white space. Make sense? I hope so. I’m trying to replicate this image within my game, of course, not the gui, but the function of it.
Picture below.
So what’s the issue? I’m clueless of how to get the distance from the black box to the edge of the monitor screen to be even, so the black box is perfectly center and scaled to the monitor/device, while also scaling the cursor as well. I have a mock up script for you to see what I mean.
CursorBox.rbxl (56.6 KB)
Trying to remake @TEARAPARTJAMES dog is hungry Cursor movement. Video related to what I’m trying to make with the cursor. https://www.youtube.com/watch?v=Jgv6crXWIuw