public void OnSelectPressedAmountChanged(SelectPressedEventData eventData) { if (Slam.Instance.Handdraggable == null) { if (eventData.PressedAmount > 0.8) { if (eventData.currentInputModule != null && eventData.currentInputModule.transform != null) { if (eventData.InputSource is InteractionInputSource) { InteractionInputSource gis = (InteractionInputSource)eventData.InputSource; var sdata = gis.transform; Slam.Instance.SetHandDraggable(GetactiveTransform(), gis, eventData.SourceId, IsHandDragable, IsHandRotatable); } } } else if (eventData.PressedAmount < 0.3) { Slam.Instance.Handdraggable = null; } } else { Slam.Instance.Handdraggable = null; } }
public void OnSelectPressedAmountChanged(SelectPressedEventData eventData) { if (eventData.PressedAmount > 0) { AnimatorGloves.SetBool("Hand State", false); } else { AnimatorGloves.SetBool("Hand State", true); } }
private void InitializeEventDatas() { inputEventData = new InputEventData(EventSystem.current); sourceClickedEventData = new InputClickedEventData(EventSystem.current); sourceStateEventData = new SourceStateEventData(EventSystem.current); manipulationEventData = new ManipulationEventData(EventSystem.current); navigationEventData = new NavigationEventData(EventSystem.current); holdEventData = new HoldEventData(EventSystem.current); pointerSpecificEventData = new PointerSpecificEventData(EventSystem.current); inputPositionEventData = new InputPositionEventData(EventSystem.current); selectPressedEventData = new SelectPressedEventData(EventSystem.current); sourceRotationEventData = new SourceRotationEventData(EventSystem.current); sourcePositionEventData = new SourcePositionEventData(EventSystem.current); xboxControllerEventData = new XboxControllerEventData(EventSystem.current); #if UNITY_WSA || UNITY_STANDALONE_WIN speechEventData = new SpeechEventData(EventSystem.current); dictationEventData = new DictationEventData(EventSystem.current); #endif }
public void OnSelectPressedAmountChanged(SelectPressedEventData eventData) { _lastPressAmount = (float)eventData.PressedAmount; }