Class CinemachineImpulseListener
An extension for Cinemachine Virtual Camera which post-processes the final position of the virtual camera. It listens for CinemachineImpulse signals on the specified channels, and moves the camera in response to them.
Inheritance
Inherited Members
Namespace: Cinemachine
Syntax
[AddComponentMenu("")]
[DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
[ExecuteAlways]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@2.8/manual/CinemachineImpulseListener.html")]
public class CinemachineImpulseListener : CinemachineExtension
Fields
m_ApplyAfter
When to apply the impulse reaction. Default is Noise.
Modify this if necessary to influence the ordering of extension effects
Declaration
[Tooltip("When to apply the impulse reaction. Default is after the Noise stage. Modify this if necessary to influence the ordering of extension effects")]
public CinemachineCore.Stage m_ApplyAfter
Field Value
Type | Description |
---|---|
CinemachineCore.Stage |
m_ChannelMask
Impulse events on channels not included in the mask will be ignored.
Declaration
[Tooltip("Impulse events on channels not included in the mask will be ignored.")]
public int m_ChannelMask
Field Value
Type | Description |
---|---|
Int32 |
m_Gain
Gain to apply to the Impulse signal.
Declaration
[Tooltip("Gain to apply to the Impulse signal. 1 is normal strength. Setting this to 0 completely mutes the signal.")]
public float m_Gain
Field Value
Type | Description |
---|---|
Single |
m_ReactionSettings
This controls the secondary reaction of the listener to the incoming impulse.
The impulse might be for example a sharp shock, and the secondary reaction could
be a vibration whose amplitude and duration is controlled by the size of the
original impulse. This allows different listeners to respond in different ways
to the same impulse signal.
Declaration
[Tooltip("This controls the secondary reaction of the listener to the incoming impulse. The impulse might be for example a sharp shock, and the secondary reaction could be a vibration whose amplitude and duration is controlled by the size of the original impulse. This allows different listeners to respond in different ways to the same impulse signal.")]
public CinemachineImpulseListener.ImpulseReaction m_ReactionSettings
Field Value
Type | Description |
---|---|
CinemachineImpulseListener.ImpulseReaction |
m_Use2DDistance
Enable this to perform distance calculation in 2D (ignore Z).
Declaration
[Tooltip("Enable this to perform distance calculation in 2D (ignore Z)")]
public bool m_Use2DDistance
Field Value
Type | Description |
---|---|
Boolean |
m_UseCameraSpace
Enable this to process all impulse signals in camera space.
Declaration
[Tooltip("Enable this to process all impulse signals in camera space")]
public bool m_UseCameraSpace
Field Value
Type | Description |
---|---|
Boolean |
Methods
PostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCore.Stage, ref CameraState, Single)
React to any detected impulses
Declaration
protected override void PostPipelineStageCallback(CinemachineVirtualCameraBase vcam, CinemachineCore.Stage stage, ref CameraState state, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
CinemachineVirtualCameraBase | vcam | The virtual camera being processed |
CinemachineCore.Stage | stage | The current pipeline stage |
CameraState | state | The current virtual camera state |
Single | deltaTime | The current applicable deltaTime |