Exemplo n.º 1
0
    private void AddPointToBezier(Vector3 position)
    {
        if (currentCurve == null)
        {
            GameObject newLine = Instantiate(prefabLine);
            currentCurve = new Curve(newLine);
        }

        GameObject newControlPoint = Instantiate(controlPointPrefab);

        newControlPoint.transform.position = position;
        currentCurve.AddControlPoints(newControlPoint);
    }