In the lerping function below, it will slow down a camera which is following a moving object, and as the moving object slows down or stops the camera catches up to it. I need th
just increase to 110%
instead of decreasing to 10%
float lerp = 1.1f;
position.x += (Obj.x + position.x) * lerp;
position.y += (Obj.y + position.y) * lerp;
Example:
public static void main(final String[] args)
{
double position = 0;
for (int i = 0; i < 100; i++)
{
position = (position + 10) * 1.1;
System.out.println("position = " + position);
}
}