Switch Player Controller

Hello,

I am trying to build a strategy game and I have set up a “bird eye” blueprint as a pawn that is controlled by the Player Controller (WASD keys) to look down into the level.

Now I want to implement the following behavior:

When the user clicks a building, I want to use a camera that is defined in the blueprint of the building and I want to deactivate any controls that are available in the bird eye. E.g. no WASD movement, no click on buildings.

I was able to activate the building camera by calling the “SetViewTargetWithBlend” in the Player Controller. But when I unpossess the bird eye, the camera gets reset to a horizon view. I assume it is not intended for the Player Controller to have no pawn being possessed.

So what are the options? Should I make any building a pawn so the player controller can possess it? That seems to be a bit counter-intuitive but might work.

Also I was thinking if I should replace the “TopDownPlayerController” with a new player controller that is only responsible for the “in-building” view. This way it would be easy to disable any controls that are not available from inside a building. Or is the Player Controller intended to live forever?

I am worried I would come up with a solution that works against the Unreal concepts, as I am still learning.

Thanks in advance

1 Like

Make your buildings pawns. I’ve successfully used this method for arch viz touchscreen apps.
You can then put the controls to exit the mode and possess something else in your building pawn bp.
Give it a go, like anything - the devil is in the details.

1 Like