ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
352 stars 82 forks source link

Vive Tracker collision stops working #83

Closed chull434 closed 5 years ago

chull434 commented 5 years ago

Hi, was using the trackers strapped to wrists as alternative to controllers but they randomly stopped triggering collisions, was using the button from example scene. I couldn't work out any root cause, it just randomly stopped and started working again, very frustrating.

I was expecting the trackers to have colliders, what adds or would remove the collider from the tracker?

chengnay commented 5 years ago

@chull434 How many controllers and trackers are you using at the same time? Could you provide more details on which version of Unity/VIU/SteamVR plugin you are using? And, which example scene you are testing on? Example 1(UGUI)?

chull434 commented 5 years ago

@chengnay there was two vive controllers and two vive trackers in use

Unity - 2018.3 VIU - v1.10 SteamVR - 1.2.7 SteamVR Plugin - 2.0.1

it was the example scene 6 controller management sample with the switch button, the push button and grab block also had prefabbed the button and vr rig and created my own scene "Demo Game" with 4 push buttons in a 2x2 wall with same basic game logic for hitting the buttons

tho once the trackers stopped colliding it didn't matter what scene i was in

the trackers would magically stop colliding with the buttons then magically start colliding again

the game was tracking all the controllers and trackers ok, it was just the collisions on the trackers that stopped

chengnay commented 5 years ago

SteamVR 2.0 and above has different senarios about controllers and trackers support. Please refer to the Wiki page Step 3 (Manage Tracking Devices) for different senarios. In VIU example scene 6, the ViveColliders (by default) only supports controllers not for trackers. If you would like the trackers to collide with gameobjects, you can adjust the following settings. Set the role to tracker and you will be able to collide in the scene. image

Hope this will help you resolve your issue.

chull434 commented 5 years ago

ahh yes, I see how it works now, thank you