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 objectss.
Namespace: Cinemachine
Syntax
[DocumentationSorting(DocumentationSortingAttribute.Level.API)]
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 |
---|---|
Boolean |
Properties
CurrentTime
This is the Impulse system's current time.
Takes into accoount whether impulse is ignoring time scale.
Declaration
public float CurrentTime { get; }
Property Value
Type | Description |
---|---|
Single |
Instance
Get the singleton instance
Declaration
public static CinemachineImpulseManager Instance { get; }
Property Value
Type | Description |
---|---|
CinemachineImpulseManager |
Methods
AddImpulseEvent(CinemachineImpulseManager.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, Boolean, Int32, out Vector3, out Quaternion)
Get the signal perceived by a listener at a geven 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 |
Boolean | distance2D | True if distance calculation should ignore Z |
Int32 | 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 |
---|---|
Boolean | 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 |