On Pawn Death Keep Camera View

Hi, whenever I destroyActor my pawn, my view is snapped out of my camera to an awkward side view of some part of the map. How can I kill my player, without detaching my view that is through my camera?

If you want to keep the camera, then you cannot destroy the actor. Option 1) transfer possession to a spectator pawn with its own camera that has the same look configuration, Option 2) keep the actor in game until you want to leave it, such as putting it into a dead behavior mode.

The camera is no way attached to the player though. It is free to itself.

1 Like

My assumption was that you had a spring arm component, sorry about that.
If your camera is free floating, then you need to reassign what it is pointing at before you destroy the actor. The actor values will probably throw you into a zero coordinate or worse as they are destructed. My next assumption is that you are updating your camera location based on the actor location, so make sure that assignment is cleared or repointed before calling destroyActor.

Ah no my camera is not linked to anything. I just set the view through my level blueprint and the camera is not linked to any actor. It is the only camera I will look through so nothing is attached to it. It destroys though when my player is destroyed. Seems like a bug or something

Pretty stale thread, but I ran into this same thing.

The fix is to disable ‘Auto Manage Active Camera’ on your Player Controller.

That setting is enabled by default, and it causes the view target to be set to the controller itself anytime the pawn is changed (which occurs when the pawn is destroyed).

4 Likes