why is my delta-time constantly changing?
u32 time = timer->getTime()
float dt = (float)( time - time2 )
time2 = time
Timer & FPS
Because that is what Delta time does. If it was constant all the time there would be no need for it ![Smile :)](./images/smilies/icon_smile.gif)
It measures how long the last frame took and returns the result - which can always fluctuate.
However large fluctuations are a sign of something bad in your code, but you didn't post your average results so I don't know how bad they are!?
![Smile :)](./images/smilies/icon_smile.gif)
It measures how long the last frame took and returns the result - which can always fluctuate.
However large fluctuations are a sign of something bad in your code, but you didn't post your average results so I don't know how bad they are!?