🎨
UVC
  • Introduction
  • Installation
    • Installing in New Project
    • Installing in Existing Project - SCK
    • Installing in Existing Project - MCK
  • Space Combat Kit Tour
  • Mech Combat Kit Tour
  • Player Setup
  • Vehicle Framework
    • Game Agents
    • Vehicles
    • Modules
      • Module Mounts
      • Modules
      • Module Types
      • Module Attachments
      • Display Module On UI
      • Module Managers
  • Input
    • General Input
    • Vehicle Input
    • Rewired Integration
  • Player/AI
  • Spaceships
    • Speed UI
    • Space Fighters
    • Capital Ships
  • Mechs
    • Speed UI
  • Vehicle Control Animations
  • Character Enter/Exit
  • Camera
    • Camera Setup
    • Vehicle Setup
    • Secondary Cameras
    • Death Camera
  • Weapons
    • Framework
      • Triggerables System
      • Weapon System
    • Vehicle Setup
      • Vehicle Weapons
      • Cursor Aiming
    • Projectile Weapons
    • Beam Weapons
    • Missile Weapons
    • Resource Handling (Ammo/Heat)
    • Turrets
    • HUD Weapon Info
    • Health Modifier Volumes
  • Radar
    • Radar Setup
    • Target Setup
    • Target Selectors
    • Trackable Types
    • Improving Radar Performance
    • Target Notification
    • Radar Audio
  • Health
    • Health Framework
      • Health
      • Damageable
      • Damage Receiver
      • Health Modifier
      • Health Types
      • Health Modifier Types
      • Surface Types
    • Vehicle Setup
    • Damageable Object Setup
    • Detonators
    • Health Recharge
    • Health UI
    • Energy Shield
    • Damageable Module Linkers
  • HUD
    • HUD Basics
    • HUD Manager Setup
    • Custom HUD Components
    • HUD Module Display
    • Camera View Management
    • HUD Cursor / Reticle
    • Weapon UI
    • Resource Container UI
    • 2D Radar
    • 3D Radar
    • Target Boxes
    • Target Holograms
    • Minimaps
    • HUD Distance Lookup
  • Loadout
  • AI - Space Combat Kit
    • AI Setup
    • AI Spaceship Behaviours
  • AI - Mech Combat Kit
  • Game States
  • Teams
  • Floating Origin
  • Object Pooling
  • Menus
    • Creating Menus
    • Button Controllers
  • Rumbles
  • Rigidbody Characters [WIP]
  • Utilities [WIP]
    • Object Triggers
    • Shadow Caster Doubles
    • Gimbals
    • Game State Post Process Enabler
  • Objectives
  • Resources System
    • Resource Containers
    • Resource Handlers
    • Resource Container Triggers
    • Module/Vehicle Resource Usage
    • UI
  • Cutscenes
  • URP Upgrading
Powered by GitBook
On this page
  • Rumble Manager
  • Reading The Current Rumble Level
  • Animated Rumbles
  • Single Frame Rumble
  • Spaceship Engine Rumbles
  • Camera Shakes
  • Controller Rumbles

Was this helpful?

Rumbles

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.

Rumble Manager

To begin adding rumbles to your scene:

  1. Add a UVC Rumble Manager component anywhere in your scene

  2. Set the player as the Listener Game Agent in the inspector

  3. 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.

This component 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:

// Get the current rumble level in any script
float currentRumbleLevel = RumbleManager.Instance.CurrentRumbleLevel;

Animated Rumbles

To set up an animated rumble:

  1. Add an Add Rumble component to any game object

  2. Customize the settings in the inspector

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
myAddRumble.Run();

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:

// Add a rumble for this frame only.
RumbleManager.Instance.AddSingleFrameRumble(rumbleAmount, rumblePosition);

Spaceship Engine Rumbles

To add rumbles for spaceship engines:

  1. Add a Vehicle Engines 3D Rumble component somewhere on your ship

  2. Set the Engines value to the ship engines

  3. Customize the rest of the settings in the inspector

Camera Shakes

You may want to add camera shakes based on the rumble level. You can do this by adding a Rumble Shaker component to your camera and customizing the settings in the inspector.

Controller Rumbles

There are scripts to add controller rumbles if you are using either Unity's Input System or Rewired.

For Unity's Input System, simply add an Input System Gamepad Rumbles component anywhere in the scene.

For Rewired, simply add a Rewired Vibration Manager component anywhere in scene.

PreviousButton ControllersNextRigidbody Characters [WIP]

Last updated 2 years ago

Was this helpful?