Under natural circumstances, brains control locomotion in the context of the action perception cycle, and movement modulates input across many sensory modalities. While neural circuits have evolved in such closed-loop conditions, many powerful techniques to study sensory processing operate on restrained animals and thus may be limited to situations in which the animal is not experiencing natural multi-modal coupling of sensory input with motor output. To overcome this challenge, we have developed a visual virtual reality system called FreemoVR which allows the experimenter to create precisely defined immersive, 3D visual surroundings for freely moving animals and we validated its use on mice, fish and flies. Taking advantage of the completely automated nature of this system and recent developments in neurogenetic tools in the fly Drosophila, we performed a screen for neural circuits specifically involved in processing of visual motion resulting from with either translational and rotational self-motion. Our findings confirm the importance of fundamental motion detecting neurons such as T4 and T5 cells for both tasks. Furthermore, we discovered other circuit elements which are involved in specific components of flight control. Taken together, this work illustrates how we may gain insight into the structure and function of neural circuits even in freely moving animals.