Working with Unity Timeline

Final Challenge: Making use of Cinemachine & Timeline

Adding in UI elements:

To start we are going to add in some UI elements that will help direct the player to utilize the functions in the game. I do all my UI elements in vector format and then save them as PNG files. Therefore I will be using Adobe illustrator for this purpose, but other programs are just as useful.

Here I have the floating image UI and also the toggle switch UI.

Scripting the UI elements together:

Now it is time to script the toggles together, in this scenario I decided that I will create a new empty game object to place the collider in.

The collider placement that will toggle the UI element, and also the future camera switch.
Perfect!

Swapping Cameras:

First we are going to create a brand new Cinemachine camera, I wanted the camera to be able to swivel around the ship so I decided to use the “Free Look Camera”. I place the free look camera around the main ship and made the rings much larger than the ship itself, so when the camera spins around, the player will be able to see all of the ship.

The 3rd person camera is set by default to be 10.
Both of these custom blends will only affect these two cameras.

Scripting:

Finally it is time to script, we are going to create a brand new C# script that will control the camera transitions. We are going to start with several local variables, an Game Object which will house the Camera. Two bools, one that will check whenever the player has stayed into the collider, and another bool for when the camera can be swapped.

Once you have created this method, the Collider script will be error free.

--

--

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Simon Truong

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.