Essential Systems / Camera Shake
Camera Shake
Enjoying Essential Systems?Leave a reviewLearn to use the included camera shake controller.
Setup
- Add
CameraShakeControllerto your camera. - Create a
Shakeasset via Create → Essentials → Camera → Shake. - 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.
- Create a
Resourcesfolder anywhere in the project. - Inside it, create a
Shake Configvia Create → Essentials → Camera → Shake Config. - Add mappings - each entry has a Name and a reference to a
Shakeasset.
There must be exactly one
Shake Configin 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

