Yes, in fact, I came to the same solution, only I have an invisible sprite covering the entire area of the "building", thanks for sharing, after the jam I will definitely make some invisible sprites.