Well I'm trying to make a circle(with dynamic position) and another circle that SHOULD not pass through the first one --- like in the image below
The reason why I am doing this way is because there can be a lot of other objects on the big one.

but the problem is that Physics.Raycast is not always detecting my sphere:

the blue lines are raycasts
Basically what i do is raycast through the whole big circle and find out where the smaller one is.
Here is my code for detecting objects on the big circle:
void GetCollisions () {
Angle FixedRenderAngle, k;
RaycastHit hit;
Vector3 p1, p2;
float d, d1, radius;
for ( int i = 0; i < Radiuses.Count; i++ ) {
if ( Angles[i] == null )
Angles[i] = new List<Angle>();
radius = Radiuses[i];
FixedRenderAngle = 360f / (float)NumberOfCalls;
AnglesLast[i] = 0;
Angle j = 0f, pj;
bool exception = false;
for ( int l = 0; l < NumberOfCalls; l++) {
j+= FixedRenderAngle;
pj = j - FixedRenderAngle;
p1 = pj.PointByRadius ( radius );
p2 = j.PointByRadius ( radius );
Debug.DrawRay ( p1, p2 - p1, Color.cyan, 3f );
if ( Physics.Raycast ( p1, p2 - p1, out hit, Vector3.Distance ( p1, p2 ) ) ) {
d = Vector3.Distance ( p1, p2 );
d1 = Vector3.Distance ( p1,hit.point );
k = pj + (j -pj) * (d1/d);
AddToAngles ( ref k, i );
}
if ( Physics.Raycast ( p2, p1 - p2, out hit, Vector3.Distance ( p1, p2 ) ) ) {
if ( AnglesLast[i] == 0 ) exception = true;
d = Vector3.Distance ( p1, p2 );
d1 = Vector3.Distance ( p1,hit.point );
k = pj + (j -pj) * (d1/d);
AddToAngles ( ref k, i );
}
}
if ( exception == true ) {
Angle tmp = Angles[i][AnglesLast[i] - 1];
for ( int l = AnglesLast[i] - 1; l > 0 ; l-- )
Angles[i][l] = Angles[i][l-1];
Angles[i][0] = tmp;
}
}
}
Angle is a class with float numbers representing degrees(0 to 360) and it's function PointByRadius is returning a Vector3 representing the location where should it be on a circle based on the angle and with a given radius.
Did I do something wrong or there is something that i don't know about raycasts? Any help would be appreciated. (Of course any other method for this would help)