How can a butterfly dodge the windshield of a fast moving car? While driving, an unlucky butterfly was about to hit my windshield. But instead of splattering, it sort of glided smoothly upwards across the surface of my windshield.  The butterfly was clearly not skillfully dodging the car because the required speed to do so would be too much for the little fellow.
There was like a repulsive force between the butterfly and the screen. Though I don't have any video evidence, I guess at least some of you must have experienced this.

Illustrative image
How does this happen? I feel like the answer lies in the nature of airflow around the car, not sure how exactly, though. This is a Fiat punto, and it does have a fairly aerodynamic shape with the windshield about 45 degrees slanted.
 A: It depends upon what approaches the window. A piece of paper is easily carried along by the flow of air that arises when the air meets the front of the car. A stone thrown in front of the window will barely notice the flow of air and it will hit the window as if no air were present (if thrown in the right way).
A: You're right that the butterfly wasn't skilfully avoiding the car. It didn't need to because it was carried over your car by the air flowing around the car. If you look at the image below of the streamline pattern around a car, we see that the streamlines start to bend upwards before they reach the front of the car. If the butterfly was at the level of your windscreen a few metres in front of your car, it would happily be carried up and over your car by the airflow.

The exception would be if the butterfly was about the height of your front bumper. We can see from the streamline pattern that there must be a stagnation point here, in which case the butterfly would end up splatted. It might also not have a fun time being carried under your car either if it was even lower.
A: While @Nick gave a good answer (“air flows up and around the car”), that answer by itself would mean no bugs ever hit the windshield - and we know that is false. So what’s the difference between a bug and a butterfly?
If we look at the problem in the frame of reference of a stationary car, there is an airstream moving towards it, and in that airstream there is a small solid object (bug, butterfly).
From the frame of reference of the object, it is in a body of air that suddenly moves up. The question then becomes - will the object move with the air stream? This depends on the size and strength of the wings and the mass of the object.
If you are a bug with small wings that you have to beat very fast to stay in the air, then most of your “lift” is generated by the motion of your wings. If the air moves a bit faster, it won’t change the lift you experience by much (because your wings were moving so fast to begin with, the extra speed of air over the wings is small). So you will go splat.
If you are a butterfly, you get enough lift without moving your wings much (because the wings are big). So if the air starts moving faster, it will tend to carry you with it.
Lucky quirk of evolution - small body with big wings will avoid fast-moving objects (though I am pretty sure that was not the main reason why butterflies evolved to have large wings...)
