Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

[Solved] SteamVR2 - Cannot prevent haptic pulse from firing when trigger pulled!

Discussion in 'Scripting' started by CloudyVR, Nov 18, 2018.

  1. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    I am using SteamVR2.0.1

    I want to not receive a haptic pulse every time the trigger is pulled. But cannot locate the source.

    Now with new SteamVR Actions I can not search for code occurances.

    How can I debug Action's sources such as the firing of the haptic pulse?

    [Update]
    I have removed haptics from all Bindings, but still Unity/SteamVR insists I need haptic feedback on my trigger.

    [Update]
    Removed all haptics from all SteamVR inputs, but still haptic pulse when trigger pulled.

    [update]
    I also tried bypassing functions which call haptic pulse from Hand.cs:
    Code (csharp):
    1.          public void TriggerHapticPulse(ushort microSecondsDuration)
    2.         {
    3.             return; //DON'T PROCESS HAPTIC PULSE
    4.             float seconds = (float)microSecondsDuration / 1000000f;
    5.             hapticAction.Execute(0, seconds, 1f / seconds, 1, handType);
    6.         }
    7.  
    8.         public void TriggerHapticPulse(float duration, float frequency, float amplitude)
    9.         {
    10.             return; //DON'T PROCESS HAPTIC PULSE
    11.             hapticAction.Execute(0, duration, frequency, amplitude, handType);
    12.         }
    Still does not disable trigger pull haptic pulse!!!

    [update]
    Using the SteamVR live input windows I can see that the "haptic seconds since last used" keeps counting (as if it did not detect the haptic pulse).

    Has Steam hard-coded bogus trigger pulse haptics into the Unity plugin???
     
    Last edited: Nov 18, 2018
  2. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    Solved this, I realized that Unity was not generating the haptic pulse after many attempts and debugging. Finally after some poking around I realized that the bindings menu allows for adding haptic pulse behavior to buttons. This runs on a higher level than Unity and will always generate a pulse when it is set.

    I had to locate the little gear icon in the bindings menu (next to the button input) and set the haptic amplitude to zero!
     
  3. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    There is no sense to that option in my opinion. If the developer wants haptic feedback he triggers it.
     
    CloudyVR likes this.