Virtual Cameras are the building blocks of the entire Cinemachine system. Every camera is at it’s very core a Virtual Camera with additional components and tweaks layered on top. There is a number of preset cameras that are designed to quickly get you up and running without having to create a virtual camera from scratch and these are better known as the additional camera types. In this article we’ll briefly go over each and where they might be useful. With every resource, it is important to really experiment to really understand how these work now let’s get started.
Free Look
First camera up is the Free Look camera is similar to Orbital camera, it even uses the Orbital Transposer. The key difference is the 3 rings that the free look camera uses to actuate. The top ring, middle, and lower ring these can be adjusted to provide zoom in and out and rotation around at desired levels. This would be good for example observing an object up close like in a gallery or model showcase from all angles.
Blended List
The next camera on the list is the Blended List camera, this allows you swap through multiple virtual cameras based on a time sequence. When you bring one into the scene, it comes with two vCams in tow however you can add as many as you’d like. It is worth noting that Blended List doesn’t limit the kind of cameras that you put in it, that means you could put track, dolly, orbital, etc as long as they’re children in the list. Then in each camera you would adjust the camera’s specific parameters like you would any other camera. On the Blend List you can set the type of transition and cut and then hold time for each camera like below.
State Driven Camera
Now let’s cover State Driven cameras, these are cameras that allow you change the type camera based on the animation state. A good example of this would be in a 3rd person shooter where you zoom in on the player when they use a scope and then pull back to the overall view of the player when they aren’t. In the example blow you can see the cameras switch based on the animation state of the capsule between moving (far away camera) and idle (up close camera). This kind of event driven camera setup can have you switch through cameras rather quickly with little scripting overhead, like a run to a idle, to a death camera.
Clearshot Camera
Wish your level layout could dictate your camera views? Tired of having to manually set triggers and fields of view? Clearshot cameras are your ticket then. By setting a target for each camera, a collider extension, and some intervening terrain you can do this in a snap. When you set up a Clearshot Camera it comes with two virtual cameras in tow but you can have as many as you like. As you can see below it will snap between the two cameras as the object comes into and out of view.
Dolly Track
Exciting panning shots, quick turns, or slow parallel tracking all the hallmarks of dynamic and exciting cinematography are now at your fingertips for your own games with dolly tracks. These are laid out tracks that you can customize to allow your cameras to move along pre-determined paths while they target your player. There are two styles of Dolly Track: Dolly Track with camera, which follows player along the dolly track as long as the player is tracked by the camera. The Dolly Cart with track (a little confusing so be sure to try out both) moves as a consistent speed along the track and does not move along with the character specifically. You can see the Dolly Track with Camera below.
Target Group Camera
As your scenes get larger, it becomes important to keep key elements of a scene together this is where the Target Group camera shines brightest. It’s as simple as adding a Target Group camera and then adding the items you wish to keep track of to the list and then the virtual camera selected will work to keep all the items (in order) together on the same view. You can see that demonstrated below as the capsule moves away from the two cubes.
2D Camera And Confiner
Cinemachine is not only capable of working for 3D scenes, it works great for 2D scenes as well. You can achieve this by using the 2D Camera and lock the camera to a confined space by using the 2D confiner. In addition you can lead the camera ahead of the player, lock the player to play area and prevent the player from seeing the edges. This can be layered with other cameras such as dolly tracks, blend lists, or target groups.
That concludes our article on Cinemachine camera types, these cameras are valuable tools in creating the look and feel that you want to deliver with your game to your player. Many times they can be layered on top of one another to create more complex camera setups and more sophisticated scene setups for your games. Like all good tools, only practice will help you figure out when and where to use them in your games. Until next time, happy coding.