If I have all my control inputs in the player controller and I want to possess another character pawn at runtime. How do I go about doing that where it successfully changes to another pawn and keeping the same controls. Right now when I possess another pawn, I get no inputs since all the inputs are on the player controller. I tried to do the un possess before possessing new character pawn but it doesn’t do anything.
Is there something I do with the game mode? I’m using blueprints. Just not sure what nodes and the setup.
I tried to move the inputs over and it was all messed up so I can’t do that. Would be nice if there was a simple way just to change the default player pawn during runtime.
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.