In this lesson, you will learn how to distinguish between the "brain" and the "body" of your player by separating the non-physical Controller from the physical Pawn.
The Brain vs. The Body
In Unreal Engine, we split the player's presence into two distinct roles. Think of it like a pilot (the Controller) and the aircraft (the Pawn).
The Pawn: The Physical Body
The Pawn represents the physical entity in your level. It has a location, a collision volume, and a mesh. If you want something to be hit by a bullet, fall off a ledge, or have its skeletal mesh animated, that is your Pawn. It is the object that exists in the world space.
The Controller: The Invisible Brain
The Controller is an actor that has no physical representation; you cannot see it, and it does not have a "location" in the 3D world. Its primary job is to hold the logic that dictates how the player interacts with the game.
When you press a key to jump, the Controller receives that input. It then decides whether to tell the Pawn to jump. This separation is powerful because it allows you to swap or "possess" different Pawns without losing your player's input settings or state.
Code Illustration
You can see how this connection works through the Possess logic:
// Inside your Controller logic
void AMyPlayerController::BeginPlay()
{
Super::BeginPlay();
// The Controller "possesses" the physical Pawn
// Now the Brain controls the Body
Possess(MyPawnInstance);
}
If you delete the Pawn, your Controller still exists, floating in the void. It is simply a brain waiting for a new body to inhabit. If you delete the Controller, the Pawn becomes a "zombie"—it remains in the world, but it can no longer react to player input because its brain has been disconnected.
Key Takeaway: The Controller is an invisible actor that stores input logic and decision-making, while the Pawn is the physical actor that represents the player's presence and movement within the game world.