Would he overly flirt with another girl to see my reaction?

There is a guy who behaves really bizarre around me. We see each other weekly in a friends group. In the very beginning he was relaxed, friendly and talkative with me like with everybody else. Then after a couple months came a time where he would completely clamp up around me, especially if we were alone before the others arrived, and seemed really awkward and fidgety. Also started avoiding looking at me directly, but I would catch him several times gazing at me and turn his head as if whiplashed when caught. Now he is back with being sort of a bit more relaxed with me but I noticed he would contradict me often or make little snark remarks. He additionally started heavily flirting with another girl in the group to a point where it's almost comical. Constantly pointing out this that and the other about her and laser focus on her. I'm kind of left scratching my head a bit. For a while I felt like I was developing feelings for him but now just think he might started hating me for some reason. Nothing happened between us argument wise. We have both similar tastes and as I already written: In the beginning it was really cool just to talk and have fun. To add: When we hung with a little group at an event not long ago he would also talk the least to me, but after having a couple drinks would repeatedly pull me in by the waist to say random things into my ear (loud music was playing). I'm confused. I know JUST ASK HIM. But can I still hear some opinions? Does he maybe think I'm into him and try to make me go off him with the heavy flirting and being standoffish?

Would he overly flirt with another girl to see my reaction?
Post Opinion