In the Drosophila visual system, photoreceptor neurons (R cells) extend axons towards glial cells located at the posterior edge of the eye disc. In gilgamesh (gish) mutants, glial cells invade anterior regions of the eye disc prior to R cell differentiation and R cell axons extend anteriorly along these cells. gish encodes casein kinase Igamma. gish, sine oculis, eyeless, and hedgehog (hh) act in the posterior region of the eye disc to prevent precocious glial cell migration. Targeted expression of Hh in this region rescues the gish phenotype, though the glial cells do not require the canonical Hh signaling pathway to respond. We propose that the spatiotemporal control of glial cell migration plays a critical role in determining the directionality of R cell axon outgrowth.