If you have ever used Cinemachine virtual cameras, you have probably noticed a Cinemachine Brain component on your main camera. Let’s talk about what that is, as well as some of the things you can do with it.
After installing Cinemachine and creating a virtual camera, you might notice the small grey and red Cinemachine logo to the right of your Main Camera. This is Cinemachine’s way of telling you that your Main Camera is now under it’s control! The virtual cameras save your a world of coding scripts for your main camera movement and rotation. Virtual cameras make the Main Camera inherit their position and rotation, which is why trying to reposition your Main Camera after creating a virtual one, appears to do nothing.
Another thing to notice is the Cinemachine Brain script component that becomes attached to your Main Camera after generating a virtual camera. This is essentially all of the backend coding that you no longer have to make from scratch when using Cinemachine!
Notice the Default Blend option is to ease in and out. This will give the camera a gradual take off and landing so to speak, when transitioning between cameras. The 2 value, represents time in seconds regarding how long it takes to move from one camera to another.
The Default Blend option can be changed through the drop-down to be ease in, ease out, both, hard in or out, linear or custom.
For this example I want to have different cameras use different blend transitions, so let’s take a look at the Custom Blends option. I do not yet have one available, so I press the Create Asset button, to generate a new Custom Blend Asset.
I am prompted to save this asset to my hard drive, so I make a new Camera Blends folder in my Assets folder (in my Unity project), then save there.