Calculate initial velocity to move a set distance with inertia
问题 I want to move something a set distance. However in my system there is inertia/drag/negative accelaration. I'm using a simple calculation like this for it: v = oldV + ((targetV - oldV) * inertia) Applying that over a number of frames makes the movement 'ramp up' or decay, eg: v = 10 + ((0 - 10) * 0.25) = 7.5 // velocity changes from 10 to 7.5 this frame So I know the distance I want to travel and the acceleration, but not the initial velocity that will get me there. Maybe a better explanation