Hi. I'm using air friction to slow my player object, and seem to be running into a issue with fixed point precision:

> vec_scale(my._speed_x, pow(air_fric, time));

air_fric is something like 0.995, so at 99fps, the pow() will be 0.999, whereas at 10fps, the pow() will be 0.995. So far so good. The problem seems to be that at 20fps, the pow() also resolves to 0.995. It really needs to be something like 0.9955, which is beyond the resolution of a var.

I could cap the player's terminal velocity manually, but that seems crude. Any suggestions?

Thank you.


Dejobaan Games - Bringing you quality video games for over 75 years.