Well, here I am with another question. How can I implement friction over time?
friction*deltatime obviously doesn’t work, it would make the friction greater than 1 if deltatime is big enough. Then I came up with the idea of Math.pow(friction, deltatime);, but it wouldn’t work either, because friction would get lower when deltatime values grow, which is not good (low framerate = big deltatime = lower friction = everything slides.) I’m out of ideas… What am I missing here?
EDIT: I get the feelling that Math.pow is still the way to go. A 0.9 friction over steps would be (0.9step1 + 0.90.9step2 + 0.90.90.9step3 + …) but how can I approximate it? Maybe “for (i=0; i<deltaTime; i++) approxfriction += 0.9*approxfriction;”?