Set cursor to centre of screen?

Hello Folks,

Just recently started using Unreal and attempting to make a basic game to get myself familiar with the engine. Coming from a Unity background is proving rather difficult!

In my game I want to be able to highlight objects with a cross hair - which is working, then I wish to click on this object to make text appear. I have the mouse click event working however I need the mouse cursor to be in the centre of the screen (same position as where the cross hair is drawn).

I notice there is a SetMousePosition function however I do not know the proper way to implement this function. Can anyone please help my out with this?

I have tried the following but no luck!

Thank you

You need to do it like so:


Thanks. I do not seem to have the option to add this function - the SetMousePosition function does not look the same as yours?


You need to first get the Player Controller and then pull the SetMousePosition node from it (exactly like in the picture).

Thank you it works!