Efficiently testing if player is indoors

Another way would be to send a ray from straight above with a given interval, and if it does not hit geometry but the player, but that would mean that you could be “indoors” under a tree or a umbrella.