Move Toward

Pure
MoveToward

Moves Current toward Target by at most MaxDelta. Will not overshoot.

Type: Pure (no side effects)
Category: Fortuna|Math & Numeric
Keywords: math & numeric

Inputs

NameTypeDefaultDescription
CurrentfloatCurrent parameter
TargetfloatTarget parameter
MaxDeltafloatMaxDelta parameter

Outputs

NameTypeDescription
ReturnValuefloatReturnValue output

Example Use Cases

Example 1

Frame-rate-independent value chasing (health bar fill).

Example 2

Gradual volume adjustment.