Documentation

Linear Interpolate - Open Dev Kit Documentation

Open Dev Kit Documentation :: General :: 2D Vector :: Linear Interpolate

Root.Vector2.Lerp(
  Vector 1 2D Vector,
  Vector 2 2D Vector,
  Factor Double
) 2D Vector
Returns Vector 1 if Factor is 0, Vector 2 if Factor is 1 and the average of Vector 1 and 2 if Factor is 0.5, with everything in between using vector interpolation

Parameters

Vector 1 2D Vector
The first vector
Vector 2 2D Vector
The second vector
Factor Double
The factor of which value is returned (usually between 0.0 and 1.0)

Return Value

2D Vector

Lua Usage

local value2DVector = value2DVector:Lerp(vector1, vector2, factor)

If you think anything is missing, please feel free to: submit documentation feedback on this page