Thanks everyone
The one thing I've always been confused about with delta timing is when to apply it.
For example...
velx = velx + (mouseXspeed() * 0.25) * deltaT
x = x + velx * deltaT
velx = velx * 0.02 * deltaT
Is this correct? the first line creates my velocity, the second adds it to my position and the third dampens it again. Just an example, but it shows where I get confused by adding deltaT to everything in sight!
Some do's and don'ts for delta would be very welcome!
The one thing I've always been confused about with delta timing is when to apply it.
For example...
velx = velx + (mouseXspeed() * 0.25) * deltaT
x = x + velx * deltaT
velx = velx * 0.02 * deltaT
Is this correct? the first line creates my velocity, the second adds it to my position and the third dampens it again. Just an example, but it shows where I get confused by adding deltaT to everything in sight!
Some do's and don'ts for delta would be very welcome!