Why is he acting like this?

My friend Tom and I have been getting quite close for the past few weeks. Yet I'm not romantically interested him, due to the fact he is, or was (unsure if he still is) in a year and a half long relationship.

A few weeks ago he gave me very, over the normal amount of friendly gestures, teasing and etc. Then, due to us both having jobs, I haven't seen him until yesterday.

Yesterday, Tom was kinda ignoring me, and mostly talking to our other mutuals. Even when it was just the two of us, Tom would go do his own thing, and not come up to me for a conversation like he usually would. I tried to strike a conversation a few times but it only lasted in 3 words. Yet at the same time, whenever I talked to anyone else, I would see in the corner of my eye him staring, and listening in. Even a few times mentioning really loudly to another friend what I said and making fun of me. (Which did really hurt my feelings.)

At the end of the day, I told my friends goodbye and he was giving me a look, just staring at me. (Which he always does.) I asked him what he wanted, but he just kept staring. So, I just turned around, and walked away.

I don't know why is acting like that. I'm seeing him and my friends again tomorrow, but I feel like I should ignore him this time.
Why is he acting like this?
Post Opinion