Fixed timestep update for physics / damping code?

Looking at your code again, I guess I probably wouldn’t use a static variable like in the example code I have. Maybe make that a member variable.

If you know for sure that you’re only going to have one object in the game running that code, the static variable will work fine. If you’re going to have multiple objects, the static variable is persistent across all of them and you’d get some undesired behavior as a result.