Return to Snippet

Revision: 52733
at November 1, 2011 03:20 by weavermedia


Initial Code
// to rotate 'mc' to point towards 'target'...

mc.rotation = Math.atan2(target.x, target.y) * (180 / Math.PI);


// if you need the angle in Radians leave off the PI modifier at the end...

var angleInRadians = Math.atan2(target.x, target.y);

Initial URL


Initial Description


Initial Title
AS3 find angle from coordinates

Initial Tags


Initial Language
ActionScript 3