RealDocs

APawn::IsPawnControlled

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

Description

Returns true if this pawn currently has a valid Controller of any kind (AI or player). On remote clients this returns false because controllers are not replicated.

Caveats & Gotchas

  • Always returns false on remote clients in a multiplayer game because AController is not replicated to non-owning clients — use HasAuthority() to guard logic that depends on this check.
  • This replaced the deprecated IsControlled() in UE 4.24 and checks any controller type; if you only want to check for a human player, use IsPlayerControlled() instead.

Signature

ENGINE_API virtual bool IsPawnControlled() const;

Return Type

bool

Examples

Guard server-only logic by confirming this pawn has an active controller Blueprint
Event BeginPlay Branch Condition Condition True False Print String In String Controller found — proceeding! Controller found — proceeding! Is Pawn Controlled Target is Pawn Return Value
Edit Blueprint graph Guard server-only logic by confirming this pawn has an active controller
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Guard server-only logic that requires a controller C++
void AMyPawn::DoSomething()
{
    if (!IsPawnControlled())
    {
        return; // No controller — nothing to do
    }
    // Safe to access GetController() here
    AController* C = GetController();
}

Version History

Introduced in: 4.24

Version Status Notes
5.6 stable
4.24 stable Introduced as a replacement for the deprecated IsControlled().

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.