How can I tell if he caught feelings or was just hoping to sleep with me?

This guy I know used to spend a lot of time around me and talking with me. He engaged in conversation and remembered so many details. We would have a great time talking about similar interests and hobbies. This went on for quite a while. He would do nice things for me, and just be pleasant to be around. He never said he liked me romantically, and since he was so easygoing around me, I thought he was my friend.

He got really weird with me though and changed instantly. He rejects any act of kindness I do towards him, he's rude, disrespectful, and he constantly pushes me away. I've tried talking with him before, but he just keeps doing the same thing. So I stay away now and don't talk to him at all and he acts bothered by this lack of attention.

Could he have developed some unwanted feelings? Or was he pretending all along in hopes of sleeping with me? Maybe it's neither but that's all I can think of.
How can I tell if he caught feelings or was just hoping to sleep with me?
Post Opinion