Jump to content

Viacheslav

Verified Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Viacheslav

  1. I'm using:
    Unity version 2020.3.22
    VIVE Wave XR Plugin - Version 4.4.0-r.8
    XR Interaction Toolkit - Version 1.0.0-pre.8 
    XR Plugin Management - Version 4.2.0
    Hardware: VIVE Focus 3

    The vibration is started by following methods:
    Interop.WVR_TriggerVibration(deviceType, WVR_InputId.WVR_InputId_Alias1_Touchpad, (uint)(duration), (uint)frequency, intensity);
    Interop.WVR_TriggerVibrationScale(deviceType, WVR_InputId.WVR_InputId_Alias1_Touchpad, (uint)(duration), (uint)frequency, impulseAmplitude);

    And reseted in the same way:
    Interop.WVR_TriggerVibration(deviceType, WVR_InputId.WVR_InputId_Alias1_Touchpad, 0, 0, 0f);
    Interop.WVR_TriggerVibrationScale(deviceType, WVR_InputId.WVR_InputId_Alias1_Touchpad, 0, 0, 0f);

    The problem is that when I quit the app when the vibration of controllers started, the app closed, but the vibration continued working. To invoke resetting of the vibration before quitting I used OnApplicationQuit(), OnApplicationPause(), OnApplicationFocus() and also tried to listen the WVR_EventType_Quit event. Also, in the Android studio's logcat I couldn't see responses from OnApplicationQuit or OnEventApplicationQuit.

    private void OnEnable()
        {
            SystemEvent.Listen(WVR_EventType.WVR_EventType_Quit, OnEventApplicationQuit);
        }

    private void OnDisable()
        {
            SystemEvent.Remove(WVR_EventType.WVR_EventType_Quit, OnEventApplicationQuit);
        }

    private void OnEventApplicationQuit(WVR_Event_t systemEvent)
        {
            Debug.LogError("Exit");
            ResetHaptic();
        }

×
×
  • Create New...