Combining Cinemachine and Timeline to Open a Treasure Chest in Unity

Objective: To combine both Cinemachine and Timeline to create a cinematic opening of a treasure chest.

Cinemachine Track combined with a Timeline Sequence

I have recently posted a couple days ago the article the showed how to open a treasure chest using Timeline. Well this one is going to be super quick and show you how to incorporate Cinemachine to give it that added cinematic touch.

Existing Scene

Using the existing scene I have already setup:

Treasure chest opening with a weapon coming out and particle effect using Timeline

Let’s add a Cinemachine camera to our existing Timeline that is going to be used to zoom in on the treasure chest when it is opened, and zoom back out once it’s closing.

Adding Cinemachine Camera to Scene

Head to the Cinemachine tab → Add Virtual Camera.

Adjust the ‘Field of View’ option in the Inspector so it looks something like this:

Virtual Camera — Field of View ‘33'

Add Cinemachine Virtual Camera to Timeline

Let’s now drag and drop this Cinemachine Virtual Camera game object into the existing Timeline, and let’s choose ‘Add Clip With Cinemachine Track’:

Drag and drop Cinemachine Virtual Camera into Timeline

The Cinemachine Track is also looking for a Cinemachine Brain, so make sure to drag your game object into this field — more than likely this will/should be sitting on your Main Camera game object. Look for this symbol in your Hierarchy:

Dragging and dropping the Cinemachine Brain into the Cinemachine Track field

It’s That Simple! Let’s Test it Out!

Cinemachine Track combined with a Timeline Sequence

It’s a little bit rough around the edges and I don’t quite like how sharply it cuts to the Cinemachine Track so let’s add some Ease In/Out to the track:

Adding some Ease In/Out to the Cinemachine Track

Let’s Try Again!

Cinemachine Track combined with a Timeline Sequence

Much Better!!!

--

--

--

Passionate Unity Game Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How I converted my room into a Virtual reality Game?

Life is a journey of twists and turns, peaks and valleys, mountains to climb and oceans to explore.

Step Functions : apply try-catch to a block of states

Automated CI Project for Maven using a remote Jenkins Server on AWS EC2 instance and Github…

GCP Professional Cloud Architect: Flunked once, cleared finally!!!

Getting started with Galaxy

Git Series — 2. Git Basics

Singly linked list in c

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
Chris Hilton

Chris Hilton

Passionate Unity Game Developer

More from Medium

Making a Treasure Chest System Using Timeline in Unity

Why Occlusion Culling Improves Performance

IK Weapon System in Unity

Adding enemies to our greybox Prototype