Search Unity

Question XRI Default Input Action mapping equivalent for On Button?

Discussion in 'Input System' started by VirtualBoyBri, Nov 6, 2022.

  1. VirtualBoyBri

    VirtualBoyBri

    Joined:
    Jan 27, 2016
    Posts:
    6
    Hoping someone has an answer for this as I haven't found a good one on the forums.

    Trying to setup the trigger on my quest controllers for automatic firing of a gun for example. Goal is to have it fire while the trigger is pressed, and stop upon the trigger being released. Similar to the old Input of using OnButton to auto fire until release of the button.

    I've tried using both a button action type, and a value action type. The value action type got me closer. However I couldn't understand it's behavior; while holding the trigger down it would auto fire for a duration, and then stop, as soon as I release the trigger it started auto firing again for a duration.

    I attempted to add some interaction settings. Originally I was hoping HOLD was the interaction I was looking for, but that just delays the start of the Input Action. Tried Press with a specific threshold but that didn't seem to change anything from auto fire example I explained above.

    I feel like I have to be missing something easy, this isn't exactly a unique interaction for games. Seems to be a pretty basic function to be able to auto fire on a trigger press, until it is released.
     
    TheKProgrammer likes this.