I'm using the great plugin (by TheRealDannyyy and Armaldio) Simple Mouselock to improve the controls in a game project I'm currently working on, but after changing the events to use this plugin instead of C2 native mouse control the cursor is bound to the origin of the window resolution (that is from 0 to 1920 horizontally and from 0 to 1080 vertically).
I've done a lot of research and seems like it can be solved using CanvasToLayer to transform the coordinates but everything I tried has somewhat solved the bounding completely messing up the positioning at the same time...
The mouse control logic I use is pretty much from C2 Ghost Shooter Demo (but adapted to an orthogonal game) and I think the angles calculations are what complicate things in my case.
Here is a basic capx that shows the issue:
plugin: https://www.construct.net/en/forum/extending-construct-2/addons-29/plugin-simple-native-like-131418