Accepting player input while paused C++

I am programming a pause menu for a game I am making and can get it to pause by using action mappings bound to functions in the player character, however I cannot receive input from the action mappings while the game is paused. I know that in blueprints there is an "Execute When Paused’ checkbox for input events, and I was wondering what sort of equivalent would be usable in C++ code for action mappings.

I’m having the same problem. Did you ever find a solution?

We found a solution you have to make the input executable when paused with a command like this.

FInputActionBinding& toggle = InputComponent->BindAction(“Pause”, IE_Pressed, this, &ATD8Character::callPause);
toggle.bExecuteWhenPaused = true;

2 Likes

Necrobump! Just noting that you can do it slightly less verbose as follows:

InputComponent->BindAction("Pause", IE_Pressed, this, &ATD8Character::callPause).bExecuteWhenPaused = true;
2 Likes

Even simpler, in the AActor derived class’ constructor, just add

PrimaryActorTick.bTickEvenWhenPaused = true;

1 Like

For enhanced input system:
Input Action-> Action → Trigger when Paused

1 Like