Struct CinemachineImpulseManager.EnvelopeDefinition
This defines the time-envelope of the signal. The raw signal will be scaled to fit inside the envelope.
Inherited Members
Namespace: Unity.Cinemachine
Assembly: solution.dll
Syntax
[Serializable]
public struct CinemachineImpulseManager.EnvelopeDefinition
Fields
Name | Description |
---|---|
AttackShape | Normalized curve defining the shape of the start of the envelope. |
AttackTime | Duration in seconds of the attack. Attack curve will be scaled to fit. Must be >= 0 |
DecayShape | Normalized curve defining the shape of the end of the envelope. |
DecayTime | Duration in seconds of the decay. Decay curve will be scaled to fit. Must be >= 0. |
HoldForever | If true, then duration is infinite. |
ScaleWithImpact | If checked, signal amplitude scaling will also be applied to the time envelope of the signal. Bigger signals will last longer |
SustainTime | Duration in seconds of the central fully-scaled part of the envelope. Must be >= 0. |
Properties
Name | Description |
---|---|
Default | Get an envelope with default values. |
Duration | Duration of the envelope, in seconds. If negative, then duration is infinite. |
Methods
Name | Description |
---|---|
ChangeStopTime(float, bool) | 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. |
Clear() | Set the envelop times to 0 and the shapes to default. |
GetValueAt(float) | Get the value of the envelope at a given time relative to the envelope start. |
Validate() | Call from OnValidate to ensure that envelope values are sane |