Why is this guy being so weird?

There's a guy I know that started being really weird towards me.
We used to get along great and be able to joke around with each other. Other people have mentioned that there was chemistry between us and that he had a crush on me, but I am taken so this guy can only be a friend and he knows this.

One day he became a totally different person towards me and other people noticed it. He would go out of his way to avoid me, ignore me and just pretend like I don't exist. It seemed like he was upset around me. I did ask him if I had upset him and if we were ok and he insisted that everything was fine. He is starting to interact with me again in small ways but every interaction seems so awkward and tense. We definitely can't joke around anymore as he became so serious. He still seems upset with me. It hurts me as I enjoyed his friendship. Thoughts?
Why is this guy being so weird?
Add Opinion