void IMixedRealityInputActionHandler.OnActionEnded(BaseInputEventData eventData) { if (eventData.MixedRealityInputAction == InputAction && !eventData.used) { OnInputActionEnded.Invoke(eventData); if (MarkEventsAsUsed) { eventData.Use(); } } }
void IMixedRealityInputActionHandler.OnActionEnded(BaseInputEventData eventData) { t_end = DateTime.Now; // when hold is less than 1 second, treat as a click behaviour if ((t_end - t_start).TotalSeconds < 0.5) { // set the position and rotation of image box; imgBox.transform.position = this.gameObject.transform.position; imgBox.transform.rotation = this.gameObject.transform.rotation; // click sound shutterSound.GetComponent <AudioSource>().Play(); // take a shot Camera.TakeAShot(); // deactivate area-of-interest and activate image box this.gameObject.SetActive(false); textInstrut.SetActive(false); imgBox.SetActive(true); Debug.Log("clicked on area-of-interest."); } }
void IMixedRealityInputActionHandler.OnActionEnded(BaseInputEventData eventData) { }
void IMixedRealityInputActionHandler.OnActionStarted(BaseInputEventData eventData) { //t_start = DateTime.Now; }