RealDocs

APawn::DisableInput

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

Description

Prevents this pawn from processing player input. APawn's override clears the internal bInputEnabled flag in addition to blocking the InputComponent, ensuring movement input accumulation also stops.

Caveats & Gotchas

  • DisableInput does not clear already-accumulated movement input (ControlInputVector). If the movement component runs after DisableInput is called this frame, it may still consume and apply the buffered input.
  • Calling DisableInput(nullptr) disables input for all controllers and is not automatically re-enabled on possession — you must explicitly call EnableInput again.

Signature

virtual void DisableInput(APlayerController* PlayerController) override;

Parameters

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

Return Type

void

Examples

Disable player input when a cutscene starts Blueprint
Start Cutscene Disable Input Target is Actor Target Player Controller Player Controller Get Player Controller Player Index 0 0 Return Value
Edit Blueprint graph Disable player input when a cutscene starts
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Disable input during a cutscene C++
void AMyPawn::StartCutscene()
{
	if (APlayerController* PC = Cast<APlayerController>(GetController()))
	{
		DisableInput(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.