Hi,

Before me trying to explain my problem, here's a picture:

Input:
I have a

Flt a = 0..1; I have three Vec

p,

v, and

x and I have a Flt

threshold such as 0.1f

Desired output:
I want a new

Vec which is smoothly blended (it'd be good for both cubic and linear solutions) between

p and

v, when lower than

threshold, or smoothly blended between

v and

x, when a is higher than

threshold. I can't have any more "weights" other than a. Looking for correctness.

1. Is this just a simple case of if statements from

a <

threshold, then individual lerps to each one? If so, can LerpCube be applied component-wise to xyz to get the desired behaviour correctly?

2. Is there a more elegant way to do this, i'm very interested!

3. Is there a mathematical name for doing this optimally, like "offset cubic equation" etc?

Thanks for your help,

Chris