I’ve done this so far >
but the problem is that it only works on the half of the left side of the screen and doesn’t even rotate to the full parameter that I’ve set (-90min 90max) >
It’s a bit unclear what are you trying to achieve.
Do you want the cannon to always point towards the mouse ?
Or do you want mouse movements to rotate the cannon, regardless of where the mouse is ?
Agreed, it’s unclear how you want it to rotate. The above does not work because the mouse position outputs values in the range 0-1920 if that’s the resolution / viewport size you’re using. This is around 90px only:

This is closer but not enough, most likely:
You’d still need to deal with relative rotation if the whole tank can rotate, too. But to advise, we’d need to know more about how it all works.
Do tell.
THANKS A TON @Everynone !! Your code was all the code I needed actually, all I added was relative rotation of the arrow >