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 |
---|---|
Attack |
Normalized curve defining the shape of the start of the envelope. |
Attack |
Duration in seconds of the attack. Attack curve will be scaled to fit. Must be >= 0 |
Decay |
Normalized curve defining the shape of the end of the envelope. |
Decay |
Duration in seconds of the decay. Decay curve will be scaled to fit. Must be >= 0. |
Hold |
If true, then duration is infinite. |
Scale |
If checked, signal amplitude scaling will also be applied to the time envelope of the signal. Bigger signals will last longer |
Sustain |
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 |
---|---|
Change |
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. |
Get |
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 |