Convert acceleration to velocity

I’m not quite certain what you are actually trying to achieve, as I’d need a pre-existing or visual example to work with. You seem to understand what velocity is (Initial velocity + acceleration over time), so that’s not the problem either.

However, I would like the point out, os.clock shouldn’t be used as a timer. At least not like this. It is useful for benchmarking, as it gives the processor has been using lua. However, for actually getting the time you can use either the user’s device time or the in-game time, using tick() or time() respectively.