I have an object that start at v0 (0m.s^-1) and needs to reach vf (10m.s^-1) in a distance of let say 25m.
This object updates its velocity using the following equation of motion:
v(n) = v(n - 1) + a * dt
With dt being the time interval since last frame (last computation of the velocity). And n being the current frame index.
I know that in order to reach the final speed vf and going from v0 the formula for the acceleration is:
a = (vf * vf - v0 * v0) / (2 * d)
With d being the distance (25m in our example).
But I can not use this acceleration in my equation of motion, in fact I tried but I do not get the correct speed. So I guess it's because the acceleration is not fit to be used every time step.
So do you know the correct formula to retrieve the acceleration I can use inside my equation of motion?
dt
s constant? – BeyelerStudiosv(n) + a*dt / 2
. – Aki Suihkonen