How to detect where the MC is coming from?

Hi!
I’ll try to explain my problem in a simple way:
I have a ball going from left to right or from right to left of stage. When this ball hits a MC positioned in the center of stage,
I have 2 options:

  1. If the ball is coming from right side it goes up. (-y)
  2. if it’s coming from left side it goes down (+y)
    Question is: How do I detect what side the ball is coming from?
    Any help please?
    Thanks.