void Update() { if (playing && isMoving) { gestureControl.UpdateGesture(animTarget.transform.position); } }
// 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(); } }
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(); } } }