[WIP] HTC Vive Controller Events Using UnityEvents

While I have been learning to use all the different inputs from the HTC Vive controllers, I put together a small component that uses UnityEvents to populate behaviors for button presses, releases, and touches. At the moment, I am primarily using this for my own prototyping, but I was wondering if anyone else would find this useful.

The component will trigger events for the following at the moment:

  • Trigger Pressed
  • Trigger Released
  • Grip Button Pressed
  • Grip Button Released
  • Touch Pad Pressed
  • Touch Pad Released
  • Touch Pad Touch Started
  • Touch Pad Touched (i.e. touch pad is actively being touched)
  • Touch Pad Touch Ended
  • Application Button Pressed
  • Application Button Released

Here is the inspector as it stands right now:

If you would find this useful please let me know what your expectations of such a system would be and if there is anything you think would be a nice addition to it. Thanks in advance to anyone that is willing to give me their thoughts on this.

3 Likes

Yes, looks worthwhile if you’re just starting developing for vive to determine how the different control calls happen and their sequence.

This looks great! I just got something working last night, but it’s not pretty. This would have been (and would still be) very handy.

1 Like

@getwilde , Thanks for the quick comment on this. Right now everything I have is set up rather simply. I am considering creating a custom subclass of UnityEvent to tie it in better with the SteamVR toolset. As I work more on this I will post updates…probably some more to come later on this week.

Looks really handy. Just what I need to trigger some UI stuff. I started yesterday to implement some UI code for the Vive controller. Your solution looks much better and far more advanced :smile:

1 Like

Heyyy! Very cool. Though I fear it may be short lived due to likely having native implementation in unity soon, it’s still very handy to have right now for some folks. Never hurts having a choice of another road to go down. Thanks! :smile: