Well, probably he's shy or maybe you should go up and talk to him.
Sounds like he is very very confused. He was probably seeing you and
thinking about the relationship that you to shared. I know when i see my
ex of multiple years a lot of thoughts emerge as well as feelings even
if i have moved on with my life. Maybe he is going through this?
Sounds like he could be shy or scared of approaching you. Or even too proud! It's not easy for an ex to admit they made a mistake and that they still have feelings. Many people try to block these thoughts from their head so they can get over a previous relationship, but if you guys see each other often then it can be hard for both of you, so maybe that's what your ex is going through right now?