private void HandleTrigger() { // If trigger isn't already held. if (!isTriggered) { if (GvrViewer.Instance.Triggered || Input.GetMouseButtonDown(0)) { // Trigger started. isTriggered = true; if (pointer != null) { pointer.OnPointerClickDown(); } } } else if (!GvrViewer.Instance.Triggered && !Input.GetMouseButton(0)) { // Trigger ended. if (pointer != null) { pointer.OnPointerClickUp(); } if (currentTarget != null) { currentTarget.OnGazeTrigger(); } isTriggered = false; } }
public void OnPointerClickDown() { GazePointer.OnPointerClickDown(); }