This question was only answered with the arrival of the high-speed camera in the 1890s. When photographers Eadweard Muybridge and Etienne-Jules Marey were able to record the flight of a bird, freezing their movements.
Looking the pictures they noticed a revealing detail: Birds twisted their wings which allowed them to control a flight despite all the variations in the air.
Are they the first inventors?
Muybridge and Marey came up with the theory first. The Wright Brothers put it in practice. They were the first to develop and fly a plane that was the base to the airplanes we have today. But others made a contribution before it. So I don't think they or any other person alone deserve the credit of the invention.