This amazing idea is from the holy Netivot Shalom on the parsha. He says that the Dor haMabul destroyed their ability to feel guilt or pain when doing an avairah. Where did it all start? "וַיִּרְא֤וּ בְנֵי־הָֽאֱלֹהִים֙ אֶת־בְּנ֣וֹת הָֽאָדָ֔ם" - the sons of nobles SAW the daughters of man. It all started with histaklus b'arai'us! They gazed at women, telling themselves they were doing nothing wrong and felt no guilt - and this dragged them down until וְכָל־יֵ֨צֶר֙ מַחְשְׁבֹ֣ת לִבּ֔וֹ רַ֥ק רַ֖ע כָּל־הַיּֽוֹם their thoughts were all aveiras.
What was the quality of Noach that saved him? וְנֹ֕חַ מָ֥צָא חֵ֖ן בְּעֵינֵ֥י יְהֹוָֽה Noach had chein - because he had HaShem-dikka eyes! He kept his eyes holy from what was going on around him. It was this zchus and kedusha that saved him.