Hello, I am trying to make a canon aim at the point of a mouse click, I cant seem to get it working, ive tried this
Code: Select all
private function mouseDown(e:MouseEvent):void
{
this.rotation = Math.atan2(e.localY - this.y , e.localX - this.x) * 180 / Math.PI;