/ Published in: ActionScript 3
Expand |
Embed | Plain Text
dx = mouseX - sprite.x; dy = mouseY - sprite.y; sprite.rotation = Math.atan2(dy, dx) * 180 / Math.PI;
You need to login to post a comment.
necnova on 04/08/11
2 people have marked this snippet as a favorite
dx = mouseX - sprite.x; dy = mouseY - sprite.y; sprite.rotation = Math.atan2(dy, dx) * 180 / Math.PI;
You need to login to post a comment.