/// <summary>
    /// Method that invokes when Line Drawing
    /// </summary>
    public void NewAction(Vector3 secondPosition)
    {
        SplinePoint point = new SplinePoint();

        point.position = LevelManager.StartPoint;
        point.size     = START_SIZE;
        _splineComputer.SetPoint(0, point);

        point          = new SplinePoint();
        secondPosition = new Vector3(secondPosition.x, 0.2f, secondPosition.z);
        point.position = secondPosition;
        point.size     = START_SIZE;
        _splineComputer.SetPoint(1, point);
    }
Example #2
0
    void StartDrawing(RaycastHit hit)
    {
        //Set drawComef.  ,  Placing first draw point and set it  , increase pointCount
        isDrawComeFromOutside       = false;
        points[pointCount]          = new SplinePoint();
        points[pointCount].position = hit.point;
        points[pointCount].normal   = Vector3.up;
        points[pointCount].size     = 1f;
        points[pointCount].color    = Color.white;

        spline.SetPoint(pointCount, points[pointCount], SplineComputer.Space.World);

        lastPos = hit.point;
        pointCount++;
        isDrawComeFromOutside = false;
    }