Connect edges at dummy nodes
This commit is contained in:
parent
1dc9252a9b
commit
f4030e7595
@ -750,13 +750,13 @@ namespace NanoBrain.Unity {
|
|||||||
|
|
||||||
Vector2 dir = to - from;
|
Vector2 dir = to - from;
|
||||||
float len = dir.magnitude;
|
float len = dir.magnitude;
|
||||||
if (len <= 2f * discRadius || len <= Mathf.Epsilon)
|
if (len <= Mathf.Epsilon) //len <= 2f * discRadius || )
|
||||||
// line too short
|
// line too short
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Vector2 n = dir / len; // normalized
|
Vector2 n = dir / len; // normalized
|
||||||
Vector2 a = from + n * discRadius;
|
Vector2 a = from;// + n * discRadius;
|
||||||
Vector2 b = to - n * discRadius;
|
Vector2 b = to;// - n * discRadius;
|
||||||
Handles.DrawLine(a, b);
|
Handles.DrawLine(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user