API Reference › Vector › Vector.lerp
method

Vector.lerp

Vector.lerp(a, b, t) -> Vector

Returns the component-wise linear interpolation between a and b by t (a fixed in 0.0..1.0). Great for smoothing a camera toward a target.

Example

program Demo {
  handler Step phase Update {
    camera = Vector.lerp(camera, target, 0.1)
  }
}
← All symbols