by Byakuren » Tue Aug 09, 2016 01:20
If you can choose both velocity and acceleration, there are infinitely many correct answers. Even for each acceleration, there are an infinite number of velocities that would work. I think that if you have both an acceleration, and desired travel time, though, you will have only one velocity that works. Other things to consider are whether you want your velocities to have a fixed magnitude.
Also, any values calculated this way are likely to not work out quite right over long distances or high accelerations, because Minetest uses the Euler method for movement calculations, which introduces large errors, including for constant accelerations. If you really want to do this, you should do your own position calculation and use setvelocity/setacceleration only for the purpose of client-side prediction.
Every time a mod API is left undocumented, a koala dies.