Usually easing equations have 4 parameters:
- time
- duration
- begin point
- end point
For example:
public static float EaseOutQuad(float currTime, float begin, float end, float duration)
{
currTime /= duration;
return -end * currTime * (currTime - 2f) + begin;
}
Now afaik begin
and end
point are fixed values.
In my game I have an object oscillating between 2 points on its local X axis. I'm interpolating its position using easing equations, but I would like to be able to modify the end point dynamically avoiding discontinous or abrupt changes.
Is it possible to do this using easing equations or something similar? Any suggestion?