Exemplo n.º 1
0
    void DrawNodeCurve(Vector3 startPos, Vector3 endPos)
    {
        myBezier = bezObj.GetComponent<Bezier_new>();
        myBezier.SetPoint(startPos, endPos);

        int count = 24;
        lr.SetColors(lineColor, lineColor);
        lr.SetVertexCount(count);
        lr.SetWidth(0.06f,0.06f);
        for (int i = 0; i < count; i++)
        {
            lr.SetPosition(i, myBezier.GetPoint(i));
        }
        //Handles.DrawBezier(startPos, endPos, startTan, endTan, Color.cyan, null, 3);
    }
Exemplo n.º 2
0
    void DrawNodeCurve(Vector3 startPos, Vector3 endPos)
    {
        /* Vector3 startTan = startPos + Vector3.right * 2;
        Vector3 endTan = endPos + Vector3.left * 2;*/

        myBezier = bezObj.GetComponent<Bezier_new>();
        myBezier.SetPoint(startPos, endPos);

        int count = 24;
        lr.SetVertexCount(count);
        lr.SetWidth(0.04f, 0.04f);
        for (int i = 0; i < count; i++)
        {
            lr.SetPosition(i, myBezier.GetPoint(i));
        }
        //Handles.DrawBezier(startPos, endPos, startTan, endTan, Color.cyan, null, 3);
    }