void IInputHandler.OnInputUp(InputEventData eventData) { InteractionSourceInputSource inputSource = eventData.InputSource as InteractionSourceInputSource; if (inputSource != null) { if (eventData.PressType == InteractionSourcePressType.Grasp) { inputSource.StopHaptics(eventData.SourceId); } } }
void IInputHandler.OnInputDown(InputEventData eventData) { InteractionSourceInputSource inputSource = eventData.InputSource as InteractionSourceInputSource; if (inputSource != null) { switch (eventData.PressType) { case InteractionSourcePressType.Grasp: inputSource.StartHaptics(eventData.SourceId, 1.0f); return; case InteractionSourcePressType.Menu: inputSource.StartHaptics(eventData.SourceId, 1.0f, 1.0f); return; } } }