Space Flight/Combat Tech Demo #1.2
rogerborg was posting principle and that is pretty much all you need.I really can't get this right, can someone please help, I try to multiply the movement, but it don't work right at all.
Code: Select all
u32 time = Timer->getTime();
u32 deltaT = time - OldTime;
if(deltaT != 0) OldTime = time;
f32 deltaTS = (f32)deltaT / 1000.0f;
f32 rVelocity = Velocity * deltaTS;
Velocity is general velocity of your object in units per second which you want to archieve.
rVelocity is velocity per frame which you want to apply on your object that frame.