What is the best way to freeze player when menu screen being displayed?

I was wondering what was the best method of which class to use to stop the mouse and keyboard input from moving the camera whilst a menu screen is loaded, and then turn it back on once a playing level is loaded?

I use:


Although there may be a better way to do this.

That’s what I would suggest as well.

I think you might also want to pause the game logic so that they don’t get killed by enemies, etc.

Do this from your player controller:

InputComponent->bBlockInput = true;



You need to make sure you block input from anything below as well. For example, if ‘M’ opens your menu and you have your menu bound in, let’s say, your pawn class then it will still open the menu if you just SetIgnore…Input().

Now, another problem arises. If you have defined inputs in your PC you can just do this:


That should kill all input until you call:


I hope that helps