Basic 2D “Screen Shake” in Unity
<p>In 2D gaming, a screen shake effect tied to movements on screen can give important sensory feedback to the player.</p>
<p>In Unity, it’s simple to implement. Here’s one way to do it (<em>in the meantime if you want to look through the finished script, you can find it </em><a href="https://gitlab.com/snippets/1784442" rel="noopener ugc nofollow" target="_blank"><em>here</em></a>):</p>
<p>Create a new script (<code>Create > C# Script</code>).</p>
<p>Call it<code>ShakeBehavior</code> and attach it to your scene’s camera <code>GameObject</code></p>
<p><a href="https://medium.com/nice-things-ios-android-development/basic-2d-screen-shake-in-unity-9c27b56b516"><strong>Learn More</strong></a></p>