예제 #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButton(0))
        {
            Vector3 worldPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            worldPoint.y = 0;
            // Debug.Log($"Touching at X:{worldPoint.x} and Z:{worldPoint.z}");

            gestureControl.UpdateGesture(worldPoint);
        }

        if (Input.GetMouseButtonUp(0))
        {
            gestureControl.DisablePointer();
        }
    }
예제 #2
0
    void Update()
    {
        if (Input.touchCount > 0)
        {
            Touch touch = Input.GetTouch(0);

            if (touch.phase == TouchPhase.Began)
            {
                Debug.Log("Touch Began");
            }

            Debug.Log($"Touching at X:{touch.position.x} and Y:{touch.position.y}");

            Vector3 worldPoint = Camera.main.ScreenToWorldPoint(touch.position);
            worldPoint.y = 0;
            gestureControl.UpdateGesture(worldPoint);

            if (touch.phase == TouchPhase.Ended)
            {
                Debug.Log("Touch Ended");
                gestureControl.DisablePointer();
            }
        }
    }
예제 #3
0
 public void TurnPointerOff()
 {
     gestureControl.DisablePointer();
     gestureLibraryInput.SwitchSendingGesturePos();
 }