Weird camera angle after Player 1 is destroyed (in a two players local multiplayer game using single screen)

Hi,

I’m relatively new to UE4 and game development in general and I need some help, so lets get straight to the point:

I’m trying to create a two players local multiplayer game (Single screen not splitscreen though), I have a simple stage or arena as I like to call it, with two Choppers spawning opposing to each other, and have a Camera actor in my level as my main camera which is setup to orthographic view and placed to get a sideview of the arena.

I also have a simple blueprint set up (within the level blueprint) to have the camera get both players with the view and follow them when both are alive, and follow whichever player that is alive when the other is dead.

This setup is working well , it get both players within view and follows them when both are alive, it follows player 1 when player 2 is destroyed (When its health variable = 0 I’m calling destroy actor node to destroy the player), my only problem when Player 1 is destroyed, the camera suddenly switches to Perspective mode and have weird angle and not following Player 2 at all, when it is the reverse the player 2 is destroyed it follows player 1 just fine.

When the game starts and both players is alive (Works fine):

When Player 2 is dead (Works fine) :

When Player 1 is dead (Here is the problem in action) :

Here is my level blueprint:

Here is where I set the view camera:

Here is my camera setup to follow players:

I couldn’t post the rest of the images in the original post (because of the 5 images limitation), so I will continue here.

This is the rest of my level BP camera setup:

Notes:

1- Dead? variable is set for both players in their BP when their health = 0 I call Destroy actor node on them.
2- CameraY_Value gets the Y-position for the camera according to which player is dead or follow both if non is dead.
3- I set the Default pawn to none in the GameMode and I’m spawning both players manually inside the Gamemode BP using Create player node and Posses nodes, each with their respective Player controller (0 and 1).

I appreciate the help, thanks in advance.

I finally got the problem fixed, I created a a new BP based on the Pawn class with only a camera actor inside it, I deleted my old camera and used this pawn as my main camera instead and placed it in the viewport in the same position as my old camera, For Player one when Health reaches Zero instead of calling destroy actor node instantaneously, what I did was creating a new Function inside of Chopper 1 BP and called it Destroy Player1, inside it I made so it sets Chopper1 visibility and collision to Not visible and No collision respectively, then set Player controller 0 to posses my Pawn that contains my camera (Player controller 0 most posses a pawn apparently to get rid of the weird camera behavior), then called destroy actor node after the posses node (still inside Destroy Player1 function).

Then when player 1 health = 0 I called Destroy Player1 function I just created and Violla all works :slight_smile: