How to handle input from PlayerController instead of Pawn

“input deals with player intent, not physical motion”

Agreed++.

Last project I did the player could switch control between 3 different pawns - a regular first person character, a flying drone, and a computer interface. There were also interface hotkeys that had nothing to do with any pawn.

This worked nicely:

  • set up all key bindings in the PlayerController
  • movement key functions would redirect to the controlled pawn
  • all player controllable pawns sub-classed a base class, so it was trivial to direct input to controlled pawn
  • PlayerController was one-stop place for all input that wasn’t related to Pawn movement (UI hotkeys huge example).
1 Like