Class CinemachineIndependentImpulseListener
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: Cinemachine
Syntax
[HelpURL("https://docs.unity.cn/Packages/com.unity.cinemachine@2.8/api/Cinemachine.CinemachineIndependentImpulseListener.html")]
public class CinemachineIndependentImpulseListener : MonoBehaviour
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_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_UseLocalSpace
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_UseLocalSpace
Field Value
Type | Description |
---|---|
Boolean |