Essential Systems / Camera Shake

Camera Shake

Enjoying Essential Systems?Leave a review

Learn to use the included camera shake controller.

Setup

  1. Add CameraShakeController to your camera.
  2. Create a Shake asset via Create → Essentials → Camera → Shake.
  3. Select the asset and configure its properties. Hover any property to see a tooltip.

Place the camera under a parent object and keep all movement logic on the parent. This way, shakes and movement won't interfere with each other.

Triggering a shake

Expose the Shake asset in the inspector and call DoShake():

public class TestShaker : MonoBehaviour
{
    public CameraShake shake;

    private void Start()
    {
        CameraShakeController.DoShake(shake);
    }
}

Shake Config

To trigger shakes by name without exposing a property on every script, use a Shake Config asset.

  1. Create a Resources folder anywhere in the project.
  2. Inside it, create a Shake Config via Create → Essentials → Camera → Shake Config.
  3. Add mappings - each entry has a Name and a reference to a Shake asset.

There must be exactly one Shake Config in the project under a Resources folder. Either remove the one in Camera Shake → Demo → Resources → Shake Config or reuse it.

Now trigger shakes by name:

public class TestShaker : MonoBehaviour
{
    private void Start()
    {
        CameraShakeController.DoShake("Shoot");
    }
}
Last updated