Automatic Animations Using Blended List Cameras in Cinemachine
Objective: To understand the Blend List Camera in Cinemachine.
Another fantastic camera to add to our arsenal of Cinemachine cameras building the perfect cutscenes/sequences.
What is the Blended List Camera?
The Blended List camera focuses on blending through a series of child cameras, upon activation. It executes a series of instructions and moves/blends through the child cameras one by one, starting with the first camera on the list and moving through to the last. When it reaches the last camera, it will hold on this until the Blended List is either deactivated on Timeline or from the Cinemachine Brain.
How to Get the Blend List Camera Setup
Nice and simple, just make sure you have Cinemachine installed from Unity’s Package Manager and then along the top tabs press Cinemachine → Create Blend List Camera.
From here let’s take a look at the settings that are available to us:
We can see that we have some new settings that we haven’t seen in the other cameras yet and these relate to building/creating new virtual cameras that will be children of the blended list and also how we want the child cameras to behave. E.g. We have some blend in options such as cut, ease in/out, linear, hard in/out and also how long we want to hold that virtual camera as the active one before it moves to the next child in the list.
Let’s Add Some More Virtual Cameras
Simply press the ‘+’ button in the ‘Virtual Camera Children’ section and let’s add a couple more and watch them automatically be added as a child game object to the blended list camera in the Hierarchy.
Let’s Build a Short Sequence Showcasing the Flow of Child Cameras
Let’s start by adding a capsule to the scene and dragging it into the ‘LookAt’ field in the component:
Next, I have moved the virtual cameras to 4 different positions that we can blend between:
Now we need to setup the behaviour for the virtual cameras which is as simple as choosing which child camera you would like to use from the virtual camera list, then deciding how you would like to blend into the next child virtual camera (and how long it should take) and finally how long the virtual camera should stay in that position for:
There is also a ‘Loop’ functionality which comes in handy when you don’t want to build long repetitive sequences!
Let’s Test It!
Let’s hit Play and see what happens:
Cinemachine Blended List Camera