Class CinemachineImpulseSource
An event-driven class that broadcasts an impulse signal to listeners.
This is the base class for custom impulse sources. It contains an impulse definition, where the characteristics of the impulse signal are defined.
API methods are provided for actually broadcasting the impulse. Call these methods from your custom code, or hook them up to game events in the Editor.
Inherited Members
Namespace: Unity.Cinemachine
Assembly: solution.dll
Syntax
[AddComponentMenu("Cinemachine/Helpers/Cinemachine Impulse Source")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.0/manual/CinemachineImpulseSource.html")]
public class CinemachineImpulseSource : MonoBehaviour
Fields
Name | Description |
---|---|
DefaultVelocity | The default direction and force of the Impulse Signal in the absence of any specified overrides. Overrides can be specified by calling the appropriate GenerateImpulse method in the API. |
ImpulseDefinition | This defines the complete impulse signal that will be broadcast. |
Methods
Name | Description |
---|---|
GenerateImpulse() | Broadcast the Impulse Signal onto the appropriate channels, with default velocity = (0, -1, 0), and a default position which is this transform's location. |
GenerateImpulse(float) | Legacy API: Please use GenerateImpulseWithForce() instead. |
GenerateImpulse(Vector3) | Legacy API: Please use GenerateImpulseWithVelocity() instead. |
GenerateImpulseAt(Vector3, Vector3) | Legacy API: Please use GenerateImpulseAtPositionWithVelocity() instead. |
GenerateImpulseAtPositionWithVelocity(Vector3, Vector3) | Broadcast the Impulse Signal onto the appropriate channels, using a custom position and impact velocity |
GenerateImpulseWithForce(float) | Broadcast the Impulse Signal onto the appropriate channels, using a custom impact force, with the standard direction, and this transfom's position. |
GenerateImpulseWithVelocity(Vector3) | Broadcast the Impulse Signal onto the appropriate channels, using a custom impact velocity, and this transfom's position. |