Struct CinemachineImpulseManager.EnvelopeDefinition
This defines the time-envelope of the signal. Thie raw signal will be scaled to fit inside the envelope.
Namespace: Cinemachine
Syntax
[Serializable]
public struct EnvelopeDefinitionFields
m_AttackShape
Normalized curve defining the shape of the start of the envelope.
Declaration
public AnimationCurve m_AttackShapeField Value
| Type | Description | 
|---|---|
| AnimationCurve | 
m_AttackTime
Duration in seconds of the attack. Attack curve will be scaled to fit. Must be >= 0
Declaration
public float m_AttackTimeField Value
| Type | Description | 
|---|---|
| System.Single | 
m_DecayShape
Normalized curve defining the shape of the end of the envelope.
Declaration
public AnimationCurve m_DecayShapeField Value
| Type | Description | 
|---|---|
| AnimationCurve | 
m_DecayTime
Duration in seconds of the decay. Decay curve will be scaled to fit. Must be >= 0.
Declaration
public float m_DecayTimeField Value
| Type | Description | 
|---|---|
| System.Single | 
m_HoldForever
If true, then duration is infinite.
Declaration
public bool m_HoldForeverField Value
| Type | Description | 
|---|---|
| System.Boolean | 
m_ScaleWithImpact
If checked, signal amplitude scaling will also be applied to the time envelope of the signal. Bigger signals will last longer
Declaration
public bool m_ScaleWithImpactField Value
| Type | Description | 
|---|---|
| System.Boolean | 
m_SustainTime
Duration in seconds of the central fully-scaled part of the envelope. Must be >= 0.
Declaration
public float m_SustainTimeField Value
| Type | Description | 
|---|---|
| System.Single | 
Properties
Duration
Duration of the envelope, in seconds. If negative, then duration is infinite.
Declaration
public float Duration { get; }Property Value
| Type | Description | 
|---|---|
| System.Single | 
Methods
ChangeStopTime(Single, Boolean)
Change the envelope so that it stops at a specific offset from its start time.
Use this to extend or cut short an existing envelope, while respecting the 
attack and decay as much as possible.
Declaration
public void ChangeStopTime(float offset, bool forceNoDecay)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Single | offset | When to stop the envelope | 
| System.Boolean | forceNoDecay | If true, enevlope will not decay, but cut off instantly | 
Clear()
Set the envelop times to 0 and the shapes to default.
Declaration
public void Clear()Default()
Get an envelope with default values.
Declaration
public static CinemachineImpulseManager.EnvelopeDefinition Default()Returns
| Type | Description | 
|---|---|
| CinemachineImpulseManager.EnvelopeDefinition | 
GetValueAt(Single)
Get the value of the tenvelope at a given time relative to the envelope start.
Declaration
public float GetValueAt(float offset)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Single | offset | Time in seconds fromt he envelope start | 
Returns
| Type | Description | 
|---|---|
| System.Single | Envelope amplitude. This will range from 0...1 | 
Validate()
Call from OnValidate to ensure that envelope values are sane
Declaration
public void Validate()