How do you change player pawn at run time when your inputs are in player controller?

What you have is a common setup.

  • Player controller has a reference to a possessed (controlled) character
  • Any controllable characters either (1) inherit from a base class or (2) implement an interface for movement
  • Player controller routs commands (“the player’s will”) to the currently controlled character

Then your input chain looks like:

Player presses “Left Key” … PlayerController->MoveLeft() … ControlledPawn->MoveLeft()

Thus each controlled character can implement MoveLeft() in its own way but your PlayerController doesn’t care. It just routs commands to whatever it currently controls.