In VertexPath.cs, line 325:
float t = (closestPoint - GetPoint(closestSegmentIndexA)).magnitude / closestSegmentLength;
will cause NaN while closestSegmentLength is zero at some time.
It should be like:
float t = (closestPoint - GetPoint(closestSegmentIndexA)).magnitude / (closestSegmentLength + 1e-4f); or something else?
In VertexPath.cs, line 325:
float t = (closestPoint - GetPoint(closestSegmentIndexA)).magnitude / closestSegmentLength;
will cause NaN while closestSegmentLength is zero at some time. It should be like:float t = (closestPoint - GetPoint(closestSegmentIndexA)).magnitude / (closestSegmentLength + 1e-4f);
or something else?