Example #1
0
    void DrawLine()
    {
        if (goList.Count < count || LineMat == null)
        {
            return;
        }
        var p0      = goList[0].transform.position;
        var p1      = goList[1].transform.position;
        var p2      = goList[2].transform.position;
        var points1 = new Vector3[] { p0, p1 };

        DrawLine_Impl(points1, Color.red);
        var points2 = new Vector3[] { p1, p2 };

        DrawLine_Impl(points2, Color.red);
        var points3 = new Vector3[num];

        BezierUtil.GetBezier(ref points3, p0, p1, p2, num);
        DrawLine_Impl(points3, Color.blue);
    }