Jump to content

Reading buttons & axes for Vive Tracker 3.0 in Unity


Recommended Posts

Hello 

I'm having a little trouble getting button & axes events from my Tracker 3.0

Using the USB interface described in the VIVE Tracker 3.0 developer guide, I have developed a python script to translate XBox Button, Trigger and Axes commands to the Vive Tracker. 

In the Steam "Test Controllers" window all buttons (Triger, Grip, Menu. Thumb/pad & System/power), seem to work correctly. But it does not give me any feedback if the X&Y Pad Axes and Trigger values work.

Using the Vive Input Utility for Unity, how can I read the values the button values with:

bool isGrip = ViveInput.GetPressEx<TrackerRole>(TrackerRole.Tracker1, ControllerButton.Grip);

For some reason ControllerButton.Pad does not seem to work. Is there another ControllerButton enum I should be using? The others Trigger, Grip, Menu & System work fine.

 

Similarly, I'm trying to read the Axes and Trigger with 

float padx = ViveInput.GetAxisEx<TrackerRole>(TrackerRole.Tracker1, ControllerAxis.PadX);

But this never seems to work either. Is GetAxisEx the right call? Or can the Tracker 3.0 not actually transmit the Pad X & Y and trigger values?

Thanks for any help

Link to comment
Share on other sites

  • 1 month later...

Maybe this wasn't the best place to post.  But I figured this out. 

First this post showed me how to get the pad button working.
Cannot get Vive Tracker touchpad press input after upgrading to VIU 1.17 - VIVE Input Utility - VIVE Forum (htc.com)

And that gave me more hints of where to look. I found this Reddit post describing how to edit the config to tell the tracker it is a controller. 
ragesaq's school of making a vive tracker Maul saber good and other things good too : r/beatsaber (reddit.com)

Now my Tracker + RaspberryPi + XBox controller appear as a Controller in SteamVR 

 

Wish this was better documented. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...