Cinemachine: How to create Camera Shake on Unity Cameras

Ever wonder how to have a camera shake effect? It’s very simple!

Camera Shake

Let’s set up a new virtual camera in our scene.

I want to add a handheld effect to the shot above.

Cinemachine Virtual Camera Component

When creating a new virtual camera, we want to access the Cinemachine Virtual Camera component in the inspector tab. At the very bottom of the component, there is a dropdown menu for the “Noise” property.

Click on the dropdown and add “Basic Multi-Channel Perlin.” Cinemachine will add Perlin Noise to the movement of the camera.

We’ll have access to a set of new properties to play with.

Noise Properties

There are 8 camera shake profiles to use!

The noise properties will help simulate camera shake! Let's take a brief look at each property.

Noise Profiles

The noise profiles are assets that can be used for specific camera shakes.

6D Shake could be used for tremors or an earthquake.
The Handheld profiles can be used to create that cameraman handheld feel.

Amplitude Gain

A value of 3 shakes the camera faster.

The Gain to apply to the amplitudes defined in the noise profile. A larger value will shake the camera more rapidly. A value of 0 mutes the noise.

Frequency Gain

A value of 5 shakes the camera more intensely and faster.

The Factor to apply to the frequencies defined in the noise profile. A larger value will intensify the speed of the camera shake.

Pivot Offset

With a pivot of x: 3, y: 4, and z: 4, we have a slight variation to the rotation.

When rotating the camera, the Pivot Offset will offset the camera’s pivot by the values of x, y, and z distance. This generates variation in the positioning to the rotation noise.

Conclusion

Cinemachine provides a simple way to add a camera shake for our needs! Now that we have an understanding of them, let's keep practicing by messing with other profiles and their properties and applying them to our games! The best way to trigger them would be to have trigger boxes on areas that would call the camera shake through code.

Gabriel

--

--

--

Hello everyone, My name is Gabriel Perez, I am a Unity Developer and a creator who is always learning and experimenting.

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

Recommended from Medium

UX Design Will Never Be a Solo Job

The importance of having a design philosophy

7 Problems Growing Design Teams Face

UX Case Study: Concept Luxury Hotel App

What Should Designers Know About Universal App?

Creating a color algorithm with accessibility in mind

The secrets of collaboration

Smarter parents through a smart baby tracker — A UX/UI Case Study

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
Gabriel Perez

Gabriel Perez

Hello everyone, My name is Gabriel Perez, I am a Unity Developer and a creator who is always learning and experimenting.

More from Medium

How to set a custom Skybox in Unity!

Script Communication in Unity using GetComponent

Getting that Hand-Held Look on Cameras + Two Cinematic Challenges

Unity Asset Bundles