Hello!
I’ve been around for quite a while but just learning an never posted in these forums
Before anything else first of all please let me thank all the awesome guys on this forums, and the whole Unity team for making such an awesome engine 
Well, is time for my first question
here it is:
Anybody can please point me in some good direction on how would I achieve the following:
I just need to check if the circle is on the dotted path. Lets say that the circle is controlled by the player with WASD and I would need to know when the circle is not following the dotted path.
Any ideas?
Tnx a bunch guys, you rock 
How do you make the dotted path? What is it?
Well, first off… welcome
Your question is actually answer in the “line” At some point you have points that make up this line. (even if you are using a beizer curve, you can get a list of points) You will then need the point that you are closest to.
float length = Mathf.Infinity;
int index = -1;
for(int i=0; i<points.Length; i++){
float len = Vector3.Distance(circle.position, points*);*
if(len < length){
length = len;
index = i;
}
}
With that, you will get the index of the closest point and the length to that point.
So first, if the length is greater than either the distance between that point and the next, or that point and the previous, it is surely “not” on the line.
Next, you can now measure dot’s, to do this you will need 3 normals. first the normal from the point to the circle, then from the point to the previous then the point to the next.
Vector3 n1 = (circle.point - points[index]).normalized;
Vector3 n2 = (points[index - 1] - points[index]).normalized;
Vector3 n3 = (points[index = 1] - points[index]).normalized;
Lastly, you need to check those normals against each other to find out how close you are to “right on target.” To do this, you can use Dot products. The closer they are to the same direction, the more they are towards 1, 90 degrees away is 0 and 180 is -1.
float d1 = Vector3.Dot(n1, n2);
float d2 = Vector3.Dot(n1, n3);
bool isOnLine = d1 > 0.9f || d2 > 0.9f;
This allows for a little slop and gets you a decent result.