How to use Cinemachinie Virtual Camera Extensions: Shake on Collision

Now that we have covered shaking the camera with player controls using an impulse listener, let’s explore shaking the camera when the player walks through a trigger.

Here I have a 3D cube object in the scene view with a collider set to Is Trigger. Add a new Component and search for Cinemachine Collision Impulse Source.

The Signal Shape needs a Raw Signal profile to be assigned.

Create a new Noise Settings like we did in the previous article, and assign it here.

Setup the Amplitude and Frequency along the X, Y and Z positional axes in the Noise Settings. This input will be what defines the position and intensity of the camera shake.

I select my main 3rd person virtual camera in the Hierarchy.

Check out the Add Extension option and look for the Cinemachine Impulse Listener.

Now in with my Player selected, the Layer can be set to Collider. If there is not a collider layer by default, feel free to create one.

We now come back to the cube trigger object, and navigate to the Trigger Object Filter header. Set the Layer Mask to be Collider, to match the Player.

That’s it! Go ahead and press play, then move through the trigger with your 3rd person character and watch the camera shake!

Please join me in my next article where I will talk about using the post-processing extension. Thanks for reading!

--

--

--

I am an artist and musician, that is currently diving headfirst into game development with C# and Unity3D.

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

Recommended from Medium

What is LRU cache?

7 Important Tips to Learn Programming Faster

Maze Platform NFT Artists Wanted

Consistency Model in Distributed System

Parse 16K URLs and Put the Result to Google Sheet in 3 Minutes

:nth-of-type vs :nth-child

The Truth On Trump’s Recent Firing Of My Father

A Brief Introduction To LaTeX — James Allen | MeetJamesAllen.com

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
Jared Amlin

Jared Amlin

I am an artist and musician, that is currently diving headfirst into game development with C# and Unity3D.

More from Medium

How to Dolly/Track a Camera in Unity

Pump Up the Jam with Unity Audio (Part 1)

Creating A Ledge Grab in Unity — Part 4: Change Player GameObject Position After Animation

Animating Sprites in Unity