topical media & game development

talk show tell print

math -- animation 5

math(s) / tutorial(s)

convert angular velocity(s)



  vx = speed * Math.cos(angle);
  vy = speed * Math.sin(angle);
  

convert angular acceleration(s)



  ax = force * Math.cos(angle);
  ay = force * Math.sin(angle);
  

add velocity(s)



  sprite.x += vx;
  sprite.y += vy;
  

add acceleration(s)



  vx += ax;
  vy += ay;
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.