I’m trying to save the cursor location and move it back when the user right clicks and drags, I have an input action set up for right click, that performs the following code:
Yet the cursor goes to the completely wrong part of the screen almost every time. I can’t tell if I’m doing something wrong or if this is a bug. Any help would be appreciated.
I am using deltas for the movement part, this is just to check whether the player has pressed the button to start rotating, as I wanted it to be customizable instead of just checking for RMB. The rotation part itself works flawlessly, I just don’t want to use CursorLockMode.Locked as it moves the cursor to the center every time.
Probably it works when doing Build & Run, but it doesn’t work in the editor?
If so, try Screen.height - mousepos.y for the y-coordinate, before passing in into WarpCursorPosition: