rotate to mouse
dx = mouseX - sprite.x dy = mouseY - sprite.y sprote.rotation = Math.atan2(dy,dx) * 180 / Math.PI