Advertisement
Flip

Untitled

Dec 9th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var diff:Number = Math.atan2(Math.sin(angle-cangle),Math.cos(angle-cangle));                   
  2. cangle += (diff > 0) ? .1 : -.1;
  3. xSpeed = Math.cos(cangle)*3;
  4. ySpeed = Math.sin(cangle)*3;
  5. rotation = cangle * (180/Math.PI);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement