Day 97: Cinemabrain

Kevin Su
3 min readMar 1, 2023

--

Cinemabrain is one of the components of cinemachine. Unity will automatically add one to the main camera object when we add virtual cameras. Cinemabrain monitors virtual cameras in the scene and which virtual camera controls the Unity camera.

In cinemabrain, we can control how virtual cameras blend/cut between them. The default blend method is the ease in/out, but we can create a custom blend by creating the Cinemachin blander asset.

Other important options are: “Ignore Time Scale” option allows the virtual camera to work in real time without being affected by the time scale when the game’s time scale is changed. The “World Up Override” option is used in the top-down game. This option uses an object’s Y axis to define the world up.

Cinemanbrain can also fire events when a virtual camera is activated or there is a cut happened between virtual cameras:

For example, we can create a security camera system using the custom blend:

  • Two blend list camera
  • A Camera controller script
  • Custom blend

The result:

--

--