The bat switches to attack mode when it senses the bug. It uses rapid maneuvers to align its flight path and to intersect with the unfortunate insect. This is like the stage of window-shopping when we see a shiny expensive thing in the window, and we head straight for it.

We haven't been sure of the same thing about bats, because in the dark, they rely primarily on a sophisticated sonar system - called echolocation - which is quite different from the way we sense the environment. To test the bat's echolocation system, we removed sources of light, mimicking a very dark night, when bats would rely completely on sonar to forage for food.