V3Lerp

From GECK
Jump to: navigation, search


A function added by the AnhNVSE Plugin.

Description

Linearly interpolates between two points, t is from 0 to 1.

Syntax

[help]
(vector3:array) V3Lerp v0:float v1:float t:float

Most commonly used to find a point some fraction of the way along a line between two endpoints (e.g. to move an object gradually between those points).

Example

array_var aVector1 = ar_list 1, 2, 3
array_var aVector2 = ar_list 4, 5, 6

array_var aLerped = V3Lerp aVector1, aVector2, 0.5        ; aLerped = [2.5, 3.5, 4.5]

See Also