Endless mouse movement when pressed

Hi, I’m using the basic third person example. I created a playercontroller and enabled mouse and created a right mouse button pressed event.

When I press right mouse button I hide the mouse by setting Show Mouse Cursor but I can’t move the mouse around forever as it gets stuck at the borders of the gamewindow.

What can I do to make it work like the basic example where no cursor is visible?

There is also an issue that when I release the mouse button and sets Show Mouse Cursor to true it keeps on rotating like its pressed, but a simple boolean in InputAxis can fix that!

I solved it, what I needed to do was set Input Game Mode Only and make make sure that the target is your player controller .

To fix the other issue I set input game mode to UI & game when releasing right click.