Using multiplication and division with delta time
- by tesselode
Using delta time with addition and subtraction is easy.
player.x += 100 * dt
However, multiplication and division complicate things a bit. For example, let's say I want the player to double his speed every second.
player.x = player.x * 2 * dt
I can't do this because it'll slow down the player (unless delta time is really high). Division is the same way, except it'll speed things way up.
How can I handle multiplication and division with delta time?