Class CinemachineImpulseManager
This is a singleton object that manages all Impulse Events generated by the Cinemachine Impulse module. This singleton owns and manages all ImpulseEvent objects.
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
public class CinemachineImpulseManager
Fields
IgnoreTimeScale
Set this to ignore time scaling so impulses can progress while the game is paused
Declaration
public bool IgnoreTimeScale
Field Value
Type | Description |
---|---|
bool |
Properties
CurrentTime
This is the Impulse system's current time.
Takes into account whether impulse is ignoring time scale.
Declaration
public float CurrentTime { get; }
Property Value
Type | Description |
---|---|
float |
Instance
Get the singleton instance
Declaration
public static CinemachineImpulseManager Instance { get; }
Property Value
Type | Description |
---|---|
CinemachineImpulseManager |
Methods
AddImpulseEvent(ImpulseEvent)
Activate an impulse event, so that it may begin broadcasting its signal
Declaration
public void AddImpulseEvent(CinemachineImpulseManager.ImpulseEvent e)
Parameters
Type | Name | Description |
---|---|---|
CinemachineImpulseManager.ImpulseEvent | e | The event to add to the current active events |
Clear()
Immediately terminate all active impulse signals
Declaration
public void Clear()
GetImpulseAt(Vector3, bool, int, out Vector3, out Quaternion)
Get the signal perceived by a listener at a given location
Declaration
public bool GetImpulseAt(Vector3 listenerLocation, bool distance2D, int channelMask, out Vector3 pos, out Quaternion rot)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | listenerLocation | Where the listener is, in world coords |
bool | distance2D | True if distance calculation should ignore Z |
int | channelMask | Only Impulse signals on channels in this mask will be considered |
Vector3 | pos | The combined position impulse signal resulting from all signals active on the specified channels |
Quaternion | rot | The combined rotation impulse signal resulting from all signals active on the specified channels |
Returns
Type | Description |
---|---|
bool | true if non-trivial signal is returned |
NewImpulseEvent()
Get a new ImpulseEvent
Declaration
public CinemachineImpulseManager.ImpulseEvent NewImpulseEvent()
Returns
Type | Description |
---|---|
CinemachineImpulseManager.ImpulseEvent | A newly-created impulse event. May be recycled from expired events |