int speedX = 5;
// 30fps so its like bulletX is increased by (5*30)=150 every second.
SetBulletX(bullet.X + speedX);
If I were to add air resistance to the above motion how will it be?
int speedX = 5;
// 30fps so its like bulletX is increased by (5*30)=150 every second.
SetBulletX(bullet.X + speedX);
I didn't read your original post.
Thanks for the help. I really appreciate it.
But its very complicated.
1 - find out how much time t has passed since the last frame (zero if its the first frame)
2 - calculate a
3 - change speedX by a * t
4 - change the position of the bullet by t * speedX
[quote name='forsandifs' timestamp='1305119518' post='4809399']
1 - find out how much time t has passed since the last frame (zero if its the first frame)
2 - calculate a
3 - change speedX by a * t
4 - change the position of the bullet by t * speedX