Infering angles

How do I make it so that with your mouse it is possible to direct an airplane like so: Steambirds (http://www.steambirds.com/)? How do I compute and draw the black line that you make to move the airplane?