docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CinemachineImpulseManager.ImpulseEvent

    Describes an event that generates an impulse signal on one or more channels. The event has a location in space, a start time, a duration, and a signal. The signal will dissipate as the distance from the event location increases.

    Inheritance
    object
    CinemachineImpulseManager.ImpulseEvent
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cinemachine
    Assembly: Unity.Cinemachine.dll
    Syntax
    public class CinemachineImpulseManager.ImpulseEvent

    Fields

    Channel

    Channels on which this event will broadcast its signal.

    Declaration
    public int Channel
    Field Value
    Type Description
    int

    CustomDissipation

    How the effect fades with distance. 0 = no dissipation, 1 = rapid dissipation, -1 = off (legacy mode)

    Declaration
    public float CustomDissipation
    Field Value
    Type Description
    float

    DirectionMode

    How the signal direction behaves as the listener moves away from the source.

    Declaration
    public CinemachineImpulseManager.ImpulseEvent.DirectionModes DirectionMode
    Field Value
    Type Description
    CinemachineImpulseManager.ImpulseEvent.DirectionModes

    DissipationDistance

    Distance over which the dissipation occurs. Must be >= 0.

    Declaration
    public float DissipationDistance
    Field Value
    Type Description
    float

    DissipationMode

    How the signal dissipates with distance.

    Declaration
    public CinemachineImpulseManager.ImpulseEvent.DissipationModes DissipationMode
    Field Value
    Type Description
    CinemachineImpulseManager.ImpulseEvent.DissipationModes

    Envelope

    Time-envelope of the signal.

    Declaration
    public CinemachineImpulseManager.EnvelopeDefinition Envelope
    Field Value
    Type Description
    CinemachineImpulseManager.EnvelopeDefinition

    Position

    World-space origin of the signal.

    Declaration
    public Vector3 Position
    Field Value
    Type Description
    Vector3

    PropagationSpeed

    The speed (m/s) at which the impulse propagates through space. High speeds allow listeners to react instantaneously, while slower speeds allow listeners in the scene to react as if to a wave spreading from the source.

    Declaration
    public float PropagationSpeed
    Field Value
    Type Description
    float

    Radius

    Radius around the signal origin that has full signal value. Distance dissipation begins after this distance.

    Declaration
    public float Radius
    Field Value
    Type Description
    float

    SignalSource

    Raw signal source. The output of this will be scaled to fit in the envelope.

    Declaration
    public ISignalSource6D SignalSource
    Field Value
    Type Description
    ISignalSource6D

    StartTime

    Start time of the event.

    Declaration
    public float StartTime
    Field Value
    Type Description
    float

    Properties

    Expired

    Returns true if the event is no longer generating a signal because its time has expired

    Declaration
    public bool Expired { get; }
    Property Value
    Type Description
    bool

    Methods

    Cancel(float, bool)

    Cancel the event at the supplied time

    Declaration
    public void Cancel(float time, bool forceNoDecay)
    Parameters
    Type Name Description
    float time

    The time at which to cancel the event

    bool forceNoDecay

    If true, event will be cut immediately at the time, otherwise its envelope's decay curve will begin at the cancel time

    Clear()

    Reset the event to a default state

    Declaration
    public void Clear()

    DistanceDecay(float)

    Calculate the the decay applicable at a given distance from the impact point

    Declaration
    public float DistanceDecay(float distance)
    Parameters
    Type Name Description
    float distance

    The distance over which to perform the decay

    Returns
    Type Description
    float

    Scale factor 0...1

    GetDecayedSignal(Vector3, bool, out Vector3, out Quaternion)

    Get the signal that a listener at a given position would perceive

    Declaration
    public bool GetDecayedSignal(Vector3 listenerPosition, bool use2D, out Vector3 pos, out Quaternion rot)
    Parameters
    Type Name Description
    Vector3 listenerPosition

    The listener's position in world space

    bool use2D

    True if distance calculation should ignore Z

    Vector3 pos

    The position impulse signal

    Quaternion rot

    The rotation impulse signal

    Returns
    Type Description
    bool

    true if non-trivial signal is returned

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)