Ramp

Runs to a target value over a set duration when triggered.

Parameters

NameTypeDescription
ValueoutputFloatThe value on its way from the start to the target.
DoneoutputTriggerFires when the value arrives at the target.
TriggerTriggerStarts a run to the target.
ResetTriggerStops any run and puts the value back at the start.
FromFloatThe value a run starts from, and the value before the first run and after a reset.
ToFloatThe value the run ends at.
DurationFloatHow many seconds a run takes.
EasingEnumThe curve the value follows during a run, the same curves Remap has. Ease In starts slow, Ease Out ends slow and Ease In Out does both.Choices: Linear, Ease In Sine, Ease Out Sine, Ease In Out Sine, Ease In Quad, Ease Out Quad, Ease In Out Quad, Ease In Cubic, Ease Out Cubic, Ease In Out Cubic, Ease In Expo, Ease Out Expo, Ease In Out Expo, Ease In Back, Ease Out Back, Ease In Out Back, Ease In Elastic, Ease Out Elastic, Ease In Out Elastic, Ease In Bounce, Ease Out Bounce, Ease In Out Bounce
Start FromEnumWhere a run starts.Choices: From Value, Current Value

The Ramp operator moves a value from From to To over the duration each time it is triggered, and then holds it there. Use it for timed transitions, such as a fade that starts on a trigger.

In From Value mode, every run starts at From, so a trigger during a run makes the value jump back and start over. In Current Value mode, a run starts wherever the value is at that moment, without a jump.

The Back and Elastic curves overshoot and pass the target for a moment. When To changes during a run, the run heads for the new target.

See also Remap, ADSR.

Keywords: tween, animate, fade, transition, ease, envelope, one shot