ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.15k stars 1.28k forks source link

Please add support for binding actions to non hand trackers OR stop filtering input if are more than 2 devices assigned as "In Hand" #1028

Open nocanwin opened 5 years ago

nocanwin commented 5 years ago

Currently only the left hand and right hand trackers have support for binding actions, but we need to get input from more than two trackers. If there are more than 2 devices assigned as "In Hand" then the system picks two and ignores input from the others. Please stop filtering this input or as a work around allow non hand trackers to have actions assigned.

This is our use case. We are creating a training application. The user has 4 tracked devices that send trigger pull input through the pogo pins. A gun, taser, flashlight and pepper spray.

dhjhero commented 5 years ago

Here is my solution. In C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\htc\resources\input\tracker, edit vive_tracker_camera_profile.json and vive_tracker_chest_profile.json, after "/input/power" section, add other input sections like this: "/input/trigger" : { "type" : "button", "order" : 2, "binding_image_point" : [ 80, 110 ] }, "/input/grip" : { "type" : "button", "order" : 3, "binding_image_point" : [ 110, 110 ] }, "/input/thumb" : { "type" : "button", "order" : 4, "binding_image_point" : [ 90, 80 ] }, "/pose/raw" : { "type" : "pose", "binding_image_point" : [ 100, 90 ] } So, you get not only trigger input source, but also grip and thumb input for tracker role camera and chest. After this, restart your steamvr, and you will find button input options you want when selecting your track to camera and chest role. And I am pretty sure they can be bound to unity3d with steamvr plugin 2.1.5b2 https://github.com/ValveSoftware/steamvr_unity_plugin/releases

You may also delete default, platform and buggy actionset, to make unity auto bind your own actionset, just for convenience.

dhjhero commented 5 years ago

However, as there are only 10 tracker roles now, still I can not manage making 12 tracker or more work with trigger event. Although their input info can be clearly observed in biding UI input debugger. How frustrating...

nocanwin commented 5 years ago

Thanks, I'll take a look. Hopefully we get official support soon.

nocanwin commented 5 years ago

Thanks @dhjhero this work. Works on v2.0.1 of the plugin.