Chapter 08 Player Classes & Input
#072 Player Controller
Your hero dies, and your deaths counter resets to zero? It belongs somewhere else.
- 1:13 video
- Written lesson
- Beginner
Free for everyone from 21 Nov 2026, 00:00 CET
Video coming soon
The player, not the body
Variables on a Pawn die with that Pawn. The Player Controller stays.
A Player Controller is the link between a human player and their Pawn. It has no body. The Game Mode creates one for each player, using its Player Controller Class setting.
- It stays while Pawns come and go, so it can possess a new body whenever you need.
- It owns player-wide behavior: Show Mouse Cursor, Get Hit Result Under Cursor, and Set View Target with Blend.
- Input logic belongs here too when characters change at runtime. The Controller decides, and the Pawn obeys.
Example: a deaths counter
The Player Controller has a Deaths variable, and a Respawn event.
- The Character is destroyed. The Controller is still here, with nothing to control.
- Respawn adds one to Deaths. Spawn Actor creates a new Character, and Possess takes control.
Deaths still says one, because the counter never lived inside that body.
Limits
- Opening a new level creates a new Controller. Use Game Instance for data that must survive.
- In multiplayer, other clients don’t have your Player Controller. Shared data goes on Player State.
In short
The Pawn is the body. The Controller is the player.
Covered in this lesson
- Player Controller
- Game Mode
- Possess
- Spawn Actor from Class
- Show Mouse Cursor
- Get Hit Result Under Cursor
- Set View Target with Blend