Interpreting someone's behavior can be challenging, especially when it comes to emotions and relationships. In this situation, there could be several possible explanations for your ex's behavior:
Mixed emotions: Your ex may still have lingering feelings for you, which could lead to him looking at you when you're not aware. However, when you're in close proximity, he might be trying to avoid showing those emotions or doesn't want to engage with you to prevent any awkwardness.
Unresolved feelings: Seeing you might bring up memories and emotions, causing him to look at you subconsciously. He might be trying to process these feelings and not sure how to approach the situation.
Curiosity: He might be curious about how you're doing or what's happening in your life, prompting him to glance in your direction when he thinks you won't notice.
Avoidance: On the other hand, he might actively avoid looking at you when you're near each other to avoid any potential confrontation or reopening old wounds from the past.
Mixed signals: Sometimes, people's actions can be inconsistent and confusing, giving mixed signals unintentionally.
Attention-seeking: It's also possible that he's seeking attention or trying to gauge your reaction to his behavior.
Remember that without direct communication, it's challenging to ascertain the exact reason behind his behavior. People are complex, and their actions can be influenced by various internal and external factors.
If you're interested in understanding his behavior or re-establishing a connection, consider having an open and honest conversation with him. This can help clarify your feelings and intentions while gaining insights into his perspective as well. However, if you've moved on or don't wish to pursue any further interaction, it's best to focus on your own well-being and continue moving forward in life.