Currently I am only using deceleration.
Here is how I do it
I need to cover Vector(x,y) unit distance to reach B from A.
I simply do -
rendering loop->
- position = A + Vector(x,y).scale(factor);
- Vector(x,y) = Vector(x,y) - Vector(x,y).scale(factor);
...factor = 10 for example So if I have to cover 100 units, I cover 10 then 9 then 8.1 and so on in every frame.
How do I simulate acceleration then deceleration here?