Class CinemachineExternalImpulseListener
This behaviour can be attached to any object to make it shake in response to Impulses.
This behaviour can be attached to the main Camera with the CinemachineBrain, to allow the main camera to shake without putting Listeners on the virtual cameras. In this case, camera shake is not dependent on the active virtual camera.
It is also possible to put this behaviour on other scene objects to shake them in response to impulses.
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[AddComponentMenu("Cinemachine/Helpers/Cinemachine External Impulse Listener")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineExternalImpulseListener.html")]
public class CinemachineExternalImpulseListener : MonoBehaviour
Fields
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.")]
[FormerlySerializedAs("m_ChannelMask")]
public int ChannelMask
Field Value
Type | Description |
---|---|
int |
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.")]
[FormerlySerializedAs("m_Gain")]
public float Gain
Field Value
Type | Description |
---|---|
float |
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.")]
[FormerlySerializedAs("m_ReactionSettings")]
public CinemachineImpulseListener.ImpulseReaction ReactionSettings
Field Value
Type | Description |
---|---|
CinemachineImpulseListener.ImpulseReaction |
Use2DDistance
Enable this to perform distance calculation in 2D (ignore Z).
Declaration
[Tooltip("Enable this to perform distance calculation in 2D (ignore Z)")]
[FormerlySerializedAs("m_Use2DDistance")]
public bool Use2DDistance
Field Value
Type | Description |
---|---|
bool |
UseLocalSpace
Enable this to process all impulse signals in camera space.
Declaration
[Tooltip("Enable this to process all impulse signals in camera space")]
[FormerlySerializedAs("m_UseLocalSpace")]
public bool UseLocalSpace
Field Value
Type | Description |
---|---|
bool |