# Convert from m/s to m/fixedFrame

Is it possible to convert from Meters/Seconds to Meters/FixedFrame?

The thing is that I compute Velocity from the formula:

d = vi * t + ((1 / 2) * a * t ^ 2) => vi = (d - ((1 / 2) * a * t ^ 2)) / t, where t is in seconds, a is in m/s^2 and d is in meters

From this formula I get the velocity in Meters/Seconds. After this, I scale the velocity like this:

velocity *= Time.fixedDeltaTime (1)

I want to decelerate the velocity inside FixedUpdate() and there i have something like:

velocity += deceleration * Time.fixedDeltaTime (2)

Something tells me that the first line (1) is not accurate. My object stops much earlier from movement.
Is there a corect way to do this conversion?

PS: I have my reasons why I do not use Unity’s physics for this part of the project.

Edit: After some calculus, I figured out that the above lines do actually scale my velocity and acceleration, but there is another problem.

Here is an example:

Before convertion:
velocity = 1, acceleration = -0.2
It would take me 5 frames to get to velocity = 0.

After convertion (Time.fixedDeltaTime = 0.02):
velocity = 0.02, acceleration = 0.004
It would also take me 5 frames to get to velocity 0.

How do I get my velocity to 0 in the time I provide to the formula (the one from the very top of this post)? At this moment, each second of that time acts like a single frame after covertion.

If I’ve understood you correctly, don’t you mean `velocity /= Time.fixedDeltaTime`?