Esempio n. 1
0
    void DrawingContinue()
    {
        if (focus == null)
        {
            return;
        }

        // Use these facts about the brush in 3d to help orient paint swatches
        Vector3 xyz     = brush.transform.position;
        Vector3 right   = brush.transform.right;
        Vector3 forward = brush.transform.forward;

/*		// A mode where the brush 3d position is ignored
 *              if(ignoreFingerPosition == true) {
 *                      input.z = 400;
 *                      xyz = Camera.main.ScreenToWorldPoint(input);
 *                      xyz = world.transform.InverseTransformPoint(xyz);
 *              }
 */
        Swatch3d art = focus.GetComponent <Swatch3d>() as Swatch3d;

        art.paintConsider(xyz, right, forward, DrawSizeDefault);

        //AddDots();
    }
Esempio n. 2
0
    void HandleMove(Vector3 input)
    {
        if (focus == null)
        {
            return;
        }

        Swatch3d art = focus.GetComponent <Swatch3d>() as Swatch3d;

        Vector3 xyz     = brush.transform.position;
        Vector3 right   = brush.transform.right;
        Vector3 forward = brush.transform.forward;

        if (ignoreFingerPosition == false)
        {
            // If the user is moving their finger around then use that as a draw hint
            input.z = 400;             // xxx TODO hack use the estimated starting distance- should correct this
            xyz     = brush.position = Camera.main.ScreenToWorldPoint(input);
        }

        art.paintConsider(Camera.main.transform.position, xyz, right, forward, DrawSizeDefault);
    }