RealDocs

APawn::EnableInput

function Engine Blueprint Since 4.0
#include "GameFramework/Pawn.h"
Access: public Specifiers: virtualoverride

Description

Re-enables input processing for this pawn after it was disabled. APawn's override also sets the internal bInputEnabled flag, which is separate from the InputComponent's block state.

Caveats & Gotchas

  • The pawn must still be possessed by a controller for input to actually work — enabling input on an unpossessed pawn has no visible effect until possession occurs.
  • APawn tracks input enabled state with an internal bInputEnabled flag (not directly accessible) in addition to the base AActor InputComponent block. Calling EnableInput sets both, but only the PlayerController-specific block is cleared on the InputComponent.

Signature

virtual void EnableInput(APlayerController* PlayerController) override;

Parameters

Name Type Description Default
PlayerController APlayerController* The player controller to re-enable input for. Pass nullptr to enable for all controllers.

Return Type

void

Examples

Re-enable player input when a cinematic ends Blueprint
On Cinematic End Enable Input Target is Actor Target Player Controller Player Controller Get Player Controller Player Index 0 0 Return Value
Edit Blueprint graph Re-enable player input when a cinematic ends
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Re-enable input after a cinematic C++
void AMyPawn::OnCinematicEnd()
{
	if (APlayerController* PC = Cast<APlayerController>(GetController()))
	{
		EnableInput(PC);
	}
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.