-
Notifications
You must be signed in to change notification settings - Fork 454
Closed as not planned
Labels
enhancementNew feature or requestNew feature or request
Description
Currently there is no built-in lerp function for the native vector
type. Instead we have to write out a function to handle this ourselves.
local function vectorLerp(a: vector, b: vector, alpha: number)
return a + (b - a) * alpha
end
local start = vector.create(-3, 1, 4)
local finish = vector.create(1, 5, 9)
local intermediate = vectorLerp(start, finish, 0.5)
This works well enough I suppose, but it can easily become repetitive having to write this in every file that requires it.
I propose that either vector.lerp
be added to the vector library, or math.lerp
natively support vector
types, as currently it can only support numbers.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request