HEADER

Shake

Overview

The Shake extension, like you probably have guessed, allows you create all kind of different camera shake effects. The shake extension editor exists mostly to allow you to test different parameter values, create presets and see what the result is during runtime by pressing the “Shake!” button.

Shake

Editor

Parameters:

Methods

For runtime implementation of a shake on your game you can use the methods:

Shake(float duration, Vector2 strength, int vibrato, float randomness, float initialAngle, Vector3 rotation, float smoothness)

Or, if you simply want to use one of your presets:

ShakeUsingPreset(string presetName)
ShakeUsingPreset(int presetIndex)

And if you want to stop all current shakes:

StopShaking()

This extension provides a static instance so it’s easier to call its methods. As an example:

ProCamera2DShake.Instance.Shake();