ReferenceVerse

Lerp Interpolation

Student can hand-roll eased motion (Lerp over a ticked timer, ease-in/out curves) instead of linear MoveTo, for juicy prop animation.

Updated
Watch the Knot — lerp-interpolation in ~90 seconds.

Watch this cannonball blast off the obsidian ramp and arc perfectly over the lava pools, landing with a heavy, juicy thud right on the finish flag.

Linear movement feels robotic, but by blending from Start to End with a curved step, we hand-roll an ease-in jump that feels alive.

We loop through thirty frames, turning our index into a fraction, squaring it for that slow-start curve, and Lerp the position before snapping the mover.

Reach for a hand-rolled Lerp loop when you need custom easing curves that the built-in mover just can't give you.

lava_jump := class(creative_device):
    @editable
    Mover : prop_mover_device = prop_mover_device{}
    OnBegin<override>()<suspends>:void =
        Start := vector3{X := 0.0, Y := 0.0, Z := 0.0}
        End := vector3{X := 0.0, Y := 500.0, Z := 300.0}
        for (T := 0..30):
            Step := (T * 1.0) / 30.0
            Pos := Lerp(Start, End, Step * Step)
            Mover.MoveTo(Pos, rotation{}, 0.0)
            Sleep(0.0)

Build your own lesson with lerp-interpolation

Generate a personalized, compile-checked lesson grounded in this exact reference.

Build a lesson →