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