Rate of Change

Outputs how fast its input is changing, in units per second.

Parameters

NameTypeDescription
ValueoutputFloatHow much the input changes per second. Positive when it goes up, negative when it goes down.
InputFloatThe value to measure.
SmoothingFloatHow many seconds the output takes to catch up with a new rate. 0 reports the raw rate.

The Rate of Change operator measures how fast its input moves. An input that rises by 2 every second gives 2, and one that holds still gives 0. Fed with a position, it gives a speed.

The raw rate is jumpy even when the input moves evenly, because frames never take exactly the same time. A smoothing of a tenth of a second is usually enough, at the cost of a small lag behind sudden changes.

Keywords: velocity, speed, derivative, slope, delta, difference