How to restore the camera while it was transitioning?

Hi guys,
I’m using transitioning among cameras (usually follow a specified player) by changing their Priority. Sometimes when cameras are transitioning, player may die and I want to restore the camera state at that time in the future (when player has revived).
Should I create a new Blend List Camera in this case?
Hope u guys have some better solutions. Thanks in advance

I’m not sure how a BlendList camera is relevant in this case. It’s not clear to me what you have in mind. You can cancel a blend in progress by cutting to a vcam. Make a special “revive” vcam and cut to it.

Thank you for your response.
I’m making a running game and trying to achieve blending effect among cameras like this (at 8:05):
https://www.youtube.com/watch?v=ehMLKwD0xg0

Given the transition from VCam 1 to VCam 2 may take about 10s to finish and player may die anytime in this progress. Tbh there’re so many transitions in my game so that I don’t want to pick a new VCam by hand for every transition cause it’s so frustrating and takes so much time. That’s why I mentioned using BlendList, cause I can assign VCam 1, VCam 2 and their weight by scripting automatically.
On the other hand, using Lerp would be an idea but I bet there should be a better one.
Hope I didn’t explain everything so unintelligible.

Thanks for the description, but I still don’t get it.

Suppose you have a whole bunch of vcams, positioned along your trajectory (as in the video). Can you have code that locates the vcam that’s nearest to the player, and activates it? Let the Brain’s default blend setting control the blend time. You can do that programmatically. A BlendList camera doesn’t help you, unless I’m missing something.

Another option is to have trigger colliders along your path, each with a CinemachineTriggerAction script that activates a specific vcam when the player enters the trigger zone.

Unfortunately, with these methods you can’t restore a mid-blend state and have it resume. If you want to do that, then there are a couple of options:

  • Dynamically create a new vcam at the camera position at the time of player death. Activate that vcam when the player restarts, and then blend to the next vcam when the player enters the next trigger zone.
  • Create a timeline with a baked series of blends. Drive it drive programmatically as a function of player position rather than time. That will allow you to have a blended set of vcams that you can randomly access and position anywhere you like.
1 Like