Make cursor stay in middle of screen.

Hi everyone,

I am working on a game with a lot of 3d widgets and I would really like my mouse to be locked in position in the middle of my screen. How would I go about doing this? Right now I have to have a button that makes the mouse visible and sets the input mode to game and UI to interact with widgets UI in the level and I am hoping to be able to use the middle of the screen to interact with the widgets. Thanks for any help you can give.

I assume there is no easy solution? Does anyone know of a work around or anything that will help me?

try this:

in your HUD widget blueprint go to graph view and override “OnMouseMove” like so:


then add the following nodes like so:


just make sure to have the HUD cover the entire screen, as this function will only be called when the cursor is over the widget!