The Rumble System makes it easy for you to set up camera shakes, controller vibrations and other rumble effects in your game, based on vehicle acceleration, explosions, collisions, weapons firing and anything else you can think of.
To begin adding rumbles to your scene:
Add a UVC Rumble Manager component anywhere in your scene
Set the player as the Listener Game Agent in the inspector
Customize the rest of the settings in the inspector
The UVC Rumble Manager reads all the rumble effects happening in the scene and calculates the overall rumble level each frame, providing a single source to get the current rumble level which is a 0-1 value.
Thiscomponent is a singleton, which means there should only be one in the scene, and it can easily be accessed in any script using the static 'RumbleManager.Instance' reference.
Reading The Current Rumble Level
To get the current rumble level (0-1) in any script, simply use the following code:
By default, the rumble will play when the object becomes active in the scene, making it useful for explosions and hit effects. You can also call the Run function like so (or add it to any Unity Event to call it when something happens):
// Run the rumble
Single Frame Rumble
Besides animated rumbles, you can add a rumble level for a single frame. This makes it easy to add rumbles that are a function of some dynamic variable in the scene (such as engine throttle).
To add a single frame rumble to the scene, use the following code from any script: