Download

How to use bBlockInput

Hi,

I am new to UE4, i hope i am in the correct section to post this.
I am trying to block the input of a character controller through code and it doesn’t work.
Here is my code :


AEnergyPlayerController::AEnergyPlayerController(const class FPostConstructInitializeProperties& PCIP)
	:Super(PCIP)
{
	bBlockInput = true;
}

When i set my GameMode to use this class as CharacterController, i can still move around when i start the game.
If i create a blueprint inheriting from this class without changing anything on the blueprint and using it in the GameMode, the movement is blocked as intended.

Could you please help me to find what i am doing wrong?
Thanks in advance.

Is your movement input handled in PlayerController or Pawn/Character?

Hi,
I don’t really know. I am using the default classes created by UE4 when i created the project.
The pawn is a DefaultPawn.