Vive tracker buttons

Vive tracker buttons

Anonymous
Not applicable
783 Views
5 Replies
Message 1 of 6

Vive tracker buttons

Anonymous
Not applicable

Is there any way to detect when the vive tracker button has been pressed? I would like to implement some functionality based on that button press.

0 Likes
784 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Hello,


what exactly is the button you call the "vive tracker button" There is a way to track all the buttons and retrieve the parameters.

Tell me which button exactly we are talking about and I will help you

 

Have a good day

0 Likes
Message 3 of 6

Anonymous
Not applicable

Tracker.PNG

This button. If you can also use the pogo pins on the back of the tracker that would good also.

 

0 Likes
Message 4 of 6

Anonymous
Not applicable

Hello,

 

I do not have this device at my fingertips, so I could not provide a solution all in hand.

 

However, the Vred API provides a function

 

GenericTracker0 = vrOpenVRController ("GenericTracker0")
GenericTracker0.connectSignal ("buttonPressed", MyPressedFunction)

 

The two HTC controllers are controller0 for the right and controller1 for the left. And GenericTracker0 GenericTracker1 etc ... for trackers

 

def MyPressedFunction (Id):
     print (Id)

 

And this function gives the id of the button pressed. This allows you to filter and above all to assign relative functions.

 

I hope helped you. Regards,

 

Good day

0 Likes
Message 5 of 6

marc.winter2
Advocate
Advocate

Hi,

 

can't get this to run. Is this the current best practice solution?

 

Best regards Marc

0 Likes
Message 6 of 6

luqiang.han
Advocate
Advocate

The buttons you want to use should be on the Tracker? If not, I have a better idea.

Just use a laser pointer. You could buy a laser pointer, which has at least two buttons.

You could do a lot of things with it in VRED.

 

0 Likes