ViveSoftware / ViveInputUtility-Unity

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

Knuckles EV3 Support #79

Closed JeffBail closed 4 years ago

JeffBail commented 5 years ago

I saw on the input support page that only the EV1 Knuckles are supported. I'm working with EV3 and I think I can move forward; I was able to get the 3DDrag example to work by using the SteamVR developer bindings GUI to setup the trigger actions. I can probably press ahead and remap controls as I need them but I'm also just wondering when EV3 will be officially supported and if I can help out with development.

lawwong commented 5 years ago

Yes, it will be grateful if you can provide the binding file for Knuckles EV3 so we can add into support.

To export binding file, just use binding UI and bind buttons for action set "htc_viu" and click "Replace Default Binding" button, then the settings will override into the Knuckles binding file under the project folder (file named "bindings_knuckles.json" by default).

For your project, Knuckles EV3 should be supported by VIU now (let us know if it didn't...).

If you willing to help, you can send us the binding file, and we will extract what VIU needs in the file, or send a pull request if you know how to add a partial binding under Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Misc/SteamVRExtension/PartialInputBindings/ folder.

P.S. File bindings_knuckles_ev1.json shows how to bind "htc_viu" actions

I'll explain more if there's any thing not cleared.

castana1962 commented 5 years ago

Hi lawwong Sorry for my little English but I am working with SteamVR 2.0.1 and EV3, for it, Is this Steam utility SteamVR 2.0.1 and EV3 compatible? Thanks Alejandro

JeffBail commented 5 years ago

Unfortunately I don't think it's simply a matter of updating the bindings; the EV3 Knuckles have controls such as the "B" button that aren't setup in HTC.UnityPlugin.Vive.ControllerButton. In the current release it's aliased to the Menu button but I couldn't figure out which button it should be. I attempted to map it as button 8 in HTC.UnityPlugin.VRModuleManagement.VRModuleRawButton and then also setup the pressActions in SteamVRModule.InitializePaths as well as the currState in UnityEngineVRModule.Update_L_Knuckles. I wasn't able to get VIU working and I realized that the SteamVR API now allows you to easily grab button state from a controller with a single line of code (as opposed to doing all the index lookups that used to be required). For now I'm using a mix of both VIU & SteamVR in my code and it's working fine.

lawwong commented 5 years ago

Oh, I see. By our design B key should bind to viu_press_01 and viu_touch_01 to get VIU work. Anyway, if I'm right, controller type for EV3 Knuckles is just "knuckles"? Then this patch ViveInputUtility_v1.10.1_knuckles_binding_patch.unitypackage.zip should work.

Let us know if it works (or not), thanks!

JeffBail commented 5 years ago

I checked in VRModuleBase.SetupKnownDeviceModel and the deviceState.modelNumber is "Knuckles EV3.0 Left" which is accepted by s_knucklesRgx so it seems like it should work.

chengnay commented 4 years ago

@JeffBail @castana1962 The latest VIU (v1.10.6) from Asset Store supports Knuckles EV3 and Index controller. Let me know if you are still having issue.