When the projectile is shoooted you associate an angle to them. Then at each frame you make the projectile move like that:
$(projectile).x(Math.cos(angle)*moveIncremant, true);$(projectile).y(Math.sin(angle)*moveIncremant, true);
Where moveIncrement is the distance the projectile should cross in one frame.
moveIncrement
Comments
When the projectile is shoooted you associate an angle to them. Then at each frame you make the projectile move like that:
Where
moveIncrement
is the distance the projectile should cross in one frame.will try this out