Firstborn/Library/PackageCache/com.unity.cinemachine@2.8.9/Documentation~/CinemachineImpulse.md
Schaken-Mods b486678290 Library -Artifacts
Library -Artifacts
2023-03-28 12:24:16 -05:00

1.8 KiB
Raw Blame History

Impulse

Cinemachine Impulse generates and manages camera shake in response to game events. For example, you can use Impulse to make a Cinemachine Virtual Camera shake when one GameObject collides with another, or when something in your Scene explodes.

Impulse has three parts:

  • Raw vibration signal: a vibration curve in up to 6 dimensions: X, Y, Z, pitch, roll, yaw.

  • Impulse Source: a component that emits the raw vibration signal from a point in Scene space, and defines signal characteristics such as duration, intensity, and range.

  • Impulse Listener: a Cinemachine extension that allows a Virtual Camera to “hear” an impulse, and react to it by shaking.

Its useful to think about this in terms of individual “impulses.” An impulse is a single occurrence of an Impulse Source emitting a raw vibration signal. Collisions and events in your Scenes trigger impulses, Impulse Sources generate impulses, and Impulse Listeners react to impulses.

Getting started with Impulse

To set up and use Impulse in a Scene, do the following: