/ Published in: ActionScript
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.
tuffstudio on 12/30/10
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.