How can I take off in a straight line if the runway isn't visible ahead?
Thats what the compass is for.   Continue to fly runway heading according to the compass &amp; heading indicator.

While you may not be able to see the runway, you may have other markers.   Even a good cloud in front of the airplane can serve as a VFR reference point.

Or look out the side to the left-and-right of the plane.  You should be able to tell if you're going straight or turning by what you see going past the sides of your plane.