Jump to content

Vive Tracker Pogo pin 4 no input with VIU.


Recommended Posts

 

Hello,
I am using  HTC Vive Trackers, VIU 1.12.2, SteamVR 2.7.4.

I am trying to get data when trigger is pressed by connecting pin 1 to pin 4, but I am not getting logs.
It is working and logging data for all other pins correctly, only pin 4/trigger is one not working.

I have tested and checked that all pins are working correctly in SteamVR test mode.

This is my current code to log all tracker data for debug purposes only:

            foreach (TrackerRole track in Enum.GetValues(typeof(TrackerRole)))
            {
                foreach (ControllerButton item in Enum.GetValues(typeof(ControllerButton)))
                {
                    if (ViveInput.GetAnyPress(track, new ControllerButtonMask(item)))
                    {
                        Debug.Log("GetPress: " + track.ToString()+" " + item.ToString());
                    }
                }

                foreach (ControllerAxis item in Enum.GetValues(typeof(ControllerAxis)))
                {
                    if (ViveInput.GetAxisEx(track, item) > 0.5f)
                    {
                        Debug.Log("GetAxis: " + track.ToString() + " " + item.ToString());
                    }
                }
                
                if (ViveInput.GetTriggerValueEx(track) > 0.5f)
                {
                    Debug.Log("GetTrigger: " + track.ToString());
                }               
            }
Edited by SolidJuho
Link to post
Share on other sites

@SolidJuho This is a known issue that we haven't update it to the public version.

Please modify below script to fix it manually.

In Assets\HTC.UnityPlugin\ViveInputUtility\Scripts\ViveInput\ControllerState.cs,

line 221,

// update hair trigger
var rawTriggerPressed = currState.GetButtonPress(VRModuleRawButton.Trigger);
var prevTriggerPressed = GetPress(ControllerButton.Trigger, true);
var currTriggerPressed = currTriggerValue == 0f ? rawTriggerPressed : (prevTriggerPressed ? currTriggerValue >= 0.45f : currTriggerValue >= 0.55f);

 

Let me know if this still did not fix your issue. Thanks!

Link to post
Share on other sites
  • 2 months later...

If you use tracker you can use this code

        if(ViveInput.GetAnyPress(track , new ControllerButtonMask(ControllerButton.Grip)))
        {
            Debug.Log("Hit");
        }

Link to post
Share on other sites

Please sign in to comment

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

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...