I'm trying to figure out how to setup friction when an object moves using timer based movement. I've done some searching but can't find a proper formula. Here's what I have:
player(player).Xvel = player(player).Xvel * 0.995
player(player).Zvel = player(player).Zvel * 0.995
Of course, this doesn't take into account the "elapsedTime#" variable. Tacking on 0.995*elapsedTime# doesn't work.
For example, .995 * 1ms = 0.000995, which basically stops the player.
If elapsedTime# is 1 second and I bump up .995 * 60FPS (target frame rate) so that it works at the 1ms speed, when the framerate slows down it works out to be accelerating the player, rather than slowing him down.
So I need some sort of formula that slows down the player at the same speed no matter the frame rate.
Thanks!

Hurray for teh logd!