Enable disable mouse control by blueprint

I’ve looked everywhere but unfortunetaly I couldn’t find the answer so hopefully someone can help me here.

I’ve created a custom “player controller” basicly like it has been described here
Because my game starts with a main menu in which I would like to have mouse control so people can navigate menu’s.

But if players start a new game I would like the mouse cursor to disappear so he can walk around like in a first person shooter.

I don’t know how to do that using blueprints. I was thinking doing something with “Event Begin Play” Action “Enable Input” etc but how to go from there I have no clue. If someone could point me in the right direction I would be very gratefull.

Before 4.5 there was “Add to Viewport” and you could do it all from there but apparently that wasn’t the right way.

TL:DR version: I’ve setup this would like to disable mous control with blueprint.


Thanks a lot for the answers I’ll try it as soon as I’m back in front of a pc!

Hi Sipher,

You should be able to show/hide the cursor through the boolean value “Show Mouse Cursor”. Look for the “Set Show Mouse Cursor” in your player controller blueprint and that will give you the ability to show/hide the cursor when you need to.

You can manipulate the Mouse Cursor etc with these 3 bools that are available from the PlayerController Class(Blueprint). Where you exactly change them to FALSE is up to you. If you start your game by loading a new level, you could use the Event Begin Play node inside your LevelBlueprint to change them when the new Map starts.

1 Like

Ok I was a bit too ashamed to ask but I’ll do it anyway ^^. How would this “Event begin play” blueprint in my new map look like?
I’m very noob but eager to learn and make progress in this wonderfull world of visual scripting (I’m a 3D artist) and I’m amazed I actually got this far.

I know this is the right answer I just don’t know how to solve this.

Best Regards,

No problem. In the Level that the player will play later, you open your LevelBlueprint:

Then, you create a “Event Begin Play” node and call the set bools:

1 Like

Yes! Great! So simple but it works. I can continue again :smiley: Thanks a lot and consider this topic solved.