Hi everyone
As you may know, the player controller saves the current mouse position which can be retrieved using the Get Mouse Position node (in Blueprints), for example, when creating a widget to make sure that the mouse pointer appears in the same position where the user left it the last time a widget was opened.
The problem is, that the player controller updates the mouse position even when it is set to Input Mode: Game Only.
So, let’s say that you create a widget, set the Input Mode to UI Only, show the mouse cursor, use Get Mouse Position to get the current mouse position, and then use Set Mouse Position to set the mouse cursor to that position (because there’s a bug that the cursor is invisible until you move the mouse.
Now let’s say that you move the mouse to the middle of the screen, destroy the widget, and set the Input Mode to Game Only.
Now let’s say that you move the mouse to the left while in-game and then create the widget again, retrieve, and set the mouse position again. You’ll notice that the mouse cursor is not where you left it but it has moved to the left because the player controller updated it while the widget was closed.
Is there a way to stop the player controller from updating the mouse position when the input mode is not set to UI only?
Thanks