Follow cursor and change direction

How could I get an object to follow the cursor and rotate to change direction as the cursor changes direction?:stormtrooper: