BlankSourceCode
Member
The readme on GitHub tries to explain in more detail how the x,y width, height scalex, scaley values work with examples.Hi @BlankSourceCode
Thanks for making this fantastic script!
I'm having trouble getting it to correctly follow my mouse position in Mac OS 13.6 (M1 MacBook Pro)
I am working on a secondary LG Ultrafine monitor which is 3840 x 2160 (mac os is scaling the display to 3008 x 1692)
The source window S I'm trying to zoom in on, when I measure it is 1929 x 1110
The zoom does not work as expected, I have to go way off to the right of the large monitor to get it to zoom in anywhere on the right hand side of the source.
GitHub - BlankSourceCode/obs-zoom-to-mouse: An OBS lua script to zoom a display-capture source to focus on the mouse
An OBS lua script to zoom a display-capture source to focus on the mouse - BlankSourceCode/obs-zoom-to-mouse
github.com
My guess is that it is some combination of x,y still being zero in your screenshot. That would mean the window you have set as the source is at the very top left position on the monitor which I suspect isn't the case.
Also Mac's (especially those with retina displays) have a tendency to report incorrect pixel sizes and scaling to OBS and therefore the script. The scale x and scale y values are used to account for this. You can take a look at this issue on GitHub where I try to figure it out with another user:
Mac Retina Display Issue · Issue #24 · BlankSourceCode/obs-zoom-to-mouse
I have tried to install this script on two different Intel MacBooks but it does not work properly on either one. After choosing the Zoom Source and assigning a hot key, it will zoom to my cursor bu...
github.com
Essentially the script is trying to convert mouse coordinates (measured in actual OS pixels) into positions in OBS (measured in whatever scaling OBS is using to squish the thing it's recording on to the canvas you made). Since there are so many factors involved in different setups it's difficult to account for.
Good luck!