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)]
[ExecuteInEditMode]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@2.6/manual/CinemachineImpulseListener.html")]
public class CinemachineImpulseListener : CinemachineExtension
Fields
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_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 |
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 |