Sitemap
cameron mcleod

cameron mcleod

Gamer, tinkerer, developer, learner.

Camera Shake via booms.

2 min readMay 12, 2025
Press enter or click to view image in full size
boom wiggle wiggle.

So unlike the Pulse bomb, the camera shake is extremely simple to pull off. Either in Editor with an animation, or in code with a Coroutine.

Press enter or click to view image in full size
ignore the Shake trigger.

open your camera, add an Animation component. Have the camera shake across the X axis as shown above in the animation window. (Note that the X Axis flows between 0 and 1)

Get cameron mcleod’s stories in your inbox

Join Medium for free to get updates from this writer.

Once that’s done, ensure that the entry is pointing to an empty game object. Add a transition from the empty object to the Shimmy animation, and have it be triggered by the Shimmy trigger.

Once that’s in, let me show you the smallest complete code file I’ve ever written.

using UnityEngine;

public class CameraEffects : MonoBehaviour
{
Animator _animator;

private void Start()
{
_animator = GetComponent<Animator>();
}


public void DoCameraShake()
{
_animator.SetTrigger("Shimmy");
}
}

This could be shorter, but as of writing this article, this code is complete. Adding it and attaching it to your camera will complete the camera shake.

Happy Coding!

--

--

cameron mcleod
cameron mcleod

Written by cameron mcleod

Gamer, tinkerer, developer, learner.