How to smoothly transition cameras during possession

Hello there,
I have been looking through the help sections for awhile, trying to find a way to make a smooth transition during 3rd-person character switching.

The idea is: when the controlled character dies or is destroyed, the camera travels/flies to another pawn/character in the level.

The ‘set view target with blend’ seems pretty viable option to me, but I can’t figure out how to get it working (I can’t figure out how to make a reference to the camera I want to blend to).
Any help or alternate suggestions would be appreciated.

To get reference to Camera, you can get reference to the Pawn/Char with that camera and get the camera component out of it. Does it help?

Set View Target with Blend takes an Actor with a Camera Component as New View Target.
If you have a Pawn with a camera component that you want to transition to, you should pass that as the New View Target. (in your case is the Magic Character BP, I suppose) .

This should result in the expected behaviour, although it can be hard to have a nice visual result using Set View Target with Blend if the position of the view target is not fixed.

If you want to have a smooth cinematic camera transition between two dinamic points, maybe the best approach could be a timeline that updates your camera position, following a spline, or some targetPoints calculated from a NavMesh (to avoid going through walls and obstacles during the transition). This requires a litlle bit more work though.

Thanks for responding.
I was eventually able to get view target with blend working when I added a camera actor to the scene. Now, I have to figure out if i can get it working with the follow camera in my character blueprint. I am able to make a reference to the follow camera, but when I try to plug it into the ‘new view target’, it says ‘camera component reference is not compatible with actor reference’. Maybe I have my blueprints set up wrong?

234517-capture.jpg

This is what i have so far.
P.S. this is in Level Blueprint

Thanks for the hints guys. I realized that the problem was:

The camera switch was happening at the same time as the possession. So, I added a delay for the possession so that there was time to blend the cameras before the player controller started looking through the camera that I wanted to blend to.

The issue lay in the fact that the possession would cause the other camera to be used before there was even a chance to blend to it.

Solved, here’s the screenshot

Thanks

2 Likes

Thanks for adding it!