Today we talk about a Cinemachine and Timeline.
These two things are incredible useful.
First of all, we try to separate things ok?
Cinemachine works around Camera. We don’t need the Timeline to work with Cinemachine.
While Timeline is most like Post Production.
A simple example is when we create a Trailer, or a “cutscene” inside our games.
Ok, let’s start with download the Cinemachine from Package Manager
Windows -> Package manager -> Cinemachine
Remember to search in Unity Registry or we can’t find it.
Feel free to download the Sample Scene if you want
Now to start, we create a Plane and reset the position to 0, 0, 0
Then we create a Cube, position it to 0, 0, 0 and apply a material (select any color you want)
This is our scene.
Before proceding, we need to tlak about VIRTUAL CAMERA.
What is it a Virtual Camera?
If we go on the top on the menus, we can see that now we have a menu called Cinemachine.
If we click it, it opens another menu.
Go to Cinemachine -> Virtual Camera and click on it.
This add a CM vcam1 in our hierarchy
And this is what we have in the Inspector.
As we can see, there are a tons of options.
What we happen is :
now we have a Main Camera and a Virtual Camera.
the Main Camera now “hears” the Virtual Camera.
Virtual Camera is a sort of “placeholder” of the Main Camera.
Every option we set in the Virtual Camera now pass at the Main Camera, for example the Follow, the Look At, the filters, etc.
And, important thing, we can have many Virtual Camera, not only one.
If we now look in the hierarchy we see a red symbol near the Main Camera, and if we look in the Inspector we se a new component added :
Thanks to the CinemachineBrain we now can “look” for the Virtual Camera.
This is what happen behind the scene with this component.
From now on, we look at every aspect of the Virtual Camera.
We need to understand every piece of this component, so we cannot rush, but we take our time to do it.
In the next article we talk in deep about that.