I want to create a top down camera/player setup where I have an alternative control scheme where pressing RMB will rotate the camera and let the player aim towards that direction, so that you can look a round instead of having a fixed camera angle.
The problem is that the mouse axis x/y gets clamped by the window or screen borders, depending on the locking mode. I want to use only raw mouse movement as input though, not the movement of the cursor.
I’m searching for hours now and couldn’t really find a solution that worked for me. I’m a env artist and don’t know much about blueprints and game dev in general, hope someone here can help me.
I have a somewhat similar setup, although it’s a third-person game.
In my player controller, when I get On Right Mouse Button Down, I set the input mode to Game Only, and set a flag
In On Right MouseButton Up, I set the input mode back to Game and UI, and clear the flag
For the “input axis yaw” and “input axis pitch” inputs, I switch on the flag, and ignore them if it isn’t set
Additionally, I bind the left button down to “forward” and also switch that event on the flag
This means that I can hold the right mouse button to pan the camera around, and press left button while right is down to mouse-run. When the right button comes up, the cursor comes back, and I can click whatever in the UI or the game.
I also have regular movement keys (WASD, arrow keys) that always work.
I was handling the control switching already with flags (I suppose you mean setting a boolean like “button_pressed”), and if this flag is set you execute the view around logic.
What I did was just to add that Input Mode Game Only and set the show mouse cursor to false when RMB is pressed. That already worked, but for redundancy, I added the Input Mode Game+UI node + the set show mouse cursor to true when the button is released.