Could it be that this poor guy is just really hungry, and that's why he's hitting at heat and movement through the glass? I had a rescue boa that while recovering from regurge syndrome would hit at anything she could see, since she was getting tiny meals, but once she was over it and back onto a more typical diet so she wasn't hungry all the time, she became very chill about being handled.