public static Vector3 GetIntersection(Vector3 lineAStart, Vector3 lineAEnd, Vector3 lineBStart, Vector3 lineBEnd)
{
float x1 = lineAStart.x, y1 = lineAStart.y;
float x2 = lineAEnd.x, y2 = lineAEnd.y;
float x3 = lineBStart.x, y3 = lineBStart.y;
float x4 = lineBEnd.x, y4 = lineBEnd.y;
//两向量相互垂直,返回0
if (x1 == x2 && x3 == x4 && x1 == x3)
{
return Vector3.zero;
}
//两向量相互平行。返回0
if (y1 == y2 && y3 == y4 && y1 == y3)
{
return Vector3.zero;
}
//两向量相互垂直,返回0
if (x1 == x2 && x3 == x4)
{
return Vector3.zero;
}
//两向量相互平行。返回0
if (y1 =&#