Move the ball and ai will following made an obstacle avoidance system so it will always reach you.
Just my idea but chatgpt helped me think of a way to avoid obstacles and I just built on that