Smooth camera transition when switching between two different characters?

Hi!

Simply put, I have a problem with camera transitioning. Why? Because I have two different characters that I want to switch between, one flying and one walking, and the player can transform between the two.

So why don’t I use just one character blueprint? Because the flying guy needs to be a pawn and the walking one a character. So the switching is done by killing one guy and spawning the other, and here is where I run into trouble; I can’t seem to make the camera transition smooth and non jerky.

Here are the different solutions I can think of:

  • Send over character and camera transforms to the other character when I switch and set them with a function or so (This is what I’ve been trying to do this far. I have something kind of working but not really)

  • Make a separate camera blueprint that follows the characters based on which one is currently alive (This seems like a good idea but I’m not sure how I would go about this. How do I setup the whole follow behaviour?)

  • Build in the walking character into the flying character by simply trying to replicate “character movement” in the pawn, and change what the controllers should do with a couple of booleans.

Has anyone done this before? If so, please post your solution. Otherwise, does anyone have an idea of how I should approach this? Any help would be greatly appreciated!

/Felix

It dependes on if you destroy the character blueprint when it dies. If you don’t destroy it then you can simply detach the camera on it and transfer it to its new location by using a timeline to lerp between the locations and rotations of the two camera locations. Then you attach the camera to its parent in the other character. The advantage of using a timeline is that you can reverse the process without having to create another function.

If your character dies, I would recommend going with a blueprint. Just deactivate the camera on your character in the beginning and activate the one on the camera blueprint. Then you basically do the same camera transfer timeline trick.