RollerBall improvement

Hello Everyone!
I want to create RollerBall game impovement - i want to train my ball to move round.
Like this (it was moved by keyboard)

So i change script that target will replaced when toched. (scripts are attached)

But there isproblem when training - rewards are zero alltimes, but as u can see ball sometimes toches the taget, so it cannot be clear zero

I need some advice how to fix it))

7937926–1014751–BallAgent.cs (2.48 KB)
7937926–1014754–TargetController.cs (4.68 KB)

Run the simulation (with ml agents) just in the editor and Put a breakpoint in here:

        if (distanceToTarget < 0.1f)
        {// Breakpoint Here
            if (Target.GetComponent<TargetController>().numberOfTargetPosition!=3)
            { 
                AddReward(1f);
            }
            else
            {
                EndEpisode();
            }
            //AddReward(1f);
            //EndEpisode();
        }
        else if (this.transform.localPosition.y < 0)
        {// second breakpoint here
            EndEpisode();
        }

With the first breakpoint Whats hapenning when the distanceToTarget < 0.1f Does it / can it ever get the reward?

With the second breakpoint is that path being triggered unnecessarily ?