Respawning a camera actor when the player dies

So, because I’m clinically insane, I’m making a 2.5D platformer in unreal. After following a tutorial on how to make a 2.5 D game, I had a separate actor for the camera. The problem is that whenever the player respawns, the camera just spawns inside the player character. Someone did tell me a fix, but because I’m stupid, I asked for visual aid. Here is the footage, as well as the blueprints: https://youtu.be/vgNQn3MmU1o

Also, for context, here are the tutorials I followed:

Do you spawn the camera manager on begin play of your character as instructed in the tutorial? (around 7:37 of the video)

I did

It seems the active camera is being override for some reason.
Try this


Passing in a reference to your camera manager blueprint. (it should find the camera inside)

1 Like

Don’t destroy the pawn on death. Just teleport it to the spawn point and reset it.

1 Like

Hey there @WillTake22! Personally I tend to go with the way Rev mentioned in cases like this, it’s often easier to just reset and move the player than to fully destroy them.

1 Like

If I may ask, how do I go about just teleporting the player?

Would I place this in the GameMode bp or the player?

Set Actor Location to teleport.

I’ve had camera distortion issues using Set Actor Transform. But Set Actor location works great for setting character to a new location.

2 Likes

If I can ask, will teleporting the player work with checkpoints and player health?

Depending on if you seek to make a vintage esque side scroller, you might want the character to instantly turn left and right. If so, this might interest you…

I haven’t got far into my Sidescroller template yet, but I made my camera actor bp just an actor bp and made a camera as the root. Drag and drop that camera actor bp into the world, and with it still selected, go into your level bp and change to this new camera.

Here is the rest of the code in the level bp to get that new camera to follow your player.
Note the adding and subtracting nodes I marked I personally just used for tuning of camera position, hope this can help you.

1 Like

Do it all in the Game mode. The GM should be were all spawning of pawns happens anyway.

  • Disable pawn input.
  • Get the spawn location.
  • Teleport to spawn location.
  • Reset pawn health, Enable pawn input.
2 Likes