Using multiplication and division with delta time
Posted
by
tesselode
on Game Development
See other posts from Game Development
or by tesselode
Published on 2012-10-07T15:09:04Z
Indexed on
2012/10/07
15:50 UTC
Read the original article
Hit count: 242
movement
|transformation
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?
© Game Development or respective owner