How would I hide & keep mouse in the same position when rotating an RTS Camera.

So I’m creating an RTS camera, and I’d like the mouse cursor to disappear when RMB is held down, and re-appear at the location it vanished, what I have in these images hides and shows the mouse correctly, albeit jittery.

I’m thinking I need to store the position when RMB is first pressed as a variable, then use this value to reset the position just before the mouse appears again. This image shows my idea, but this doesn’t store my variable.

Does anyone have some tips?

Hi @Chip_14

I fixed this by setting the mouse back to centre of screen on lifting the RMB , you could do the same or use a remebered set of screen coords .

All i have on RMB event was on started set a bool to true and on completed set it to false then in my rotation code only allow the movement if the RMB bool is true

So you could add the code at rhe end of the RMB started hide mouse and remember coords in a vevtor 2. Then on completed set mouse coords to old position and show mouse.