Insects rely on visual cues to estimate and control their distance to approaching objects and their flight speed. Here we show that in free-flight, the motion cues generated by high-contrast vertical edges are crucial for these estimates. Within a visual environment dominated by high-contrast horizontal edges, flies fly unusually fast and barely avoid colliding with the walls of the enclosure. The disruption of flight behavior by horizontal edges provides insight into the structure of visually-mediated control algorithms.