Input systme doesn't work with the latest WaveVR SDK

demonixis
Explorer

Input systme doesn't work with the latest WaveVR SDK

Hello,

I can't get the input system to work since I've updated to the latest version of the SDK. I tried to create a gameobject and adding the WaveVR_ButtonList, as explained in that article but it changes nothing. Have you any clues to fix that? I've a game almost ready for a release on the store, this is the last issue. I can also share the code with the Vive Focus Team if necessary.

Thanks.

Vive Staff

Re: Input systme doesn't work with the latest WaveVR SDK

Hi @demonixis ,

 

That article  indicates how to enable button via WaveVR_ButtonList, but no sample code how to use the button.

Please check the steps inside https://hub.vive.com/storage/app/doc/en-us/WaveVR_Controller.html

Thanks.

demonixis
Explorer

Re: Input systme doesn't work with the latest WaveVR SDK

Hello,

Thanks for you answer. I know how to use the API, please take a look at my code [just here](https://gist.github.com/demonixis/776a85a25798d2b7517bb663a08e6c96). Everything worked with the previous SDK. With the new version I have no more input.

Thanks.

Vive Staff

Re: Input systme doesn't work with the latest WaveVR SDK

Hi @demonixis ,

 

Sorry for late reply, thanks for your feedback.

We look into your code, and please check our comment below.

1. Developer should not handle the “left-handed” mode for using WaveVR_Controller.

Inputsystem_1.pngInputsystem_2.png

If developer use only 1 controller, the “controller” would always be “WVR_DeviceType_Controller_Right”.

The unique condition of using “WVR_DeviceType_Controller_Left” is that developer uses 2 controllers concurrently and needs to get the status of left controller.

No matter 1 or 2 controller(s) condition, developer never needs to check “WaveVR_Controller.IsLeftHanded” before using “WaveVR_Controller.Input”.
Because WaveVR_Controller handles the left-handed mode automatically.

 

2. Developer uses many buttons in code:

Inputsystem_3.png

including Trigger / DPad_Up / Menu / Grip / DPad_Left / DPad_Right and System.

So developer needs to specify these keys in WaveVRButton (drag from Assets/WaveVR/Prefabs) as below:

Inputsystem_4.png

And I see that “System” key is specified but it is not allowed.

If developer wants a key mapping to “Thumbstick”, just specify “Thumbstick” in WaveVRButtons like:

Inputsystem_5.png

Please have a try, and provide android logcat (must enable DEBUG level in AP) if buttons are still not workable.

Thanks.

demonixis
Explorer

Re: Input systme doesn't work with the latest WaveVR SDK

Hello,

Thanks for your reply. My game supports one or two controllers, that's why I use them.

I'll change my code to only use the right controller when only one controller is detected.

Thanks