ViveSoftware / ViveInputUtility-Unity

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

Trigger button is invalid in Unity #194

Open mimiky opened 4 years ago

mimiky commented 4 years ago

SDK: Wave VR 3.2.0 Vive Input Utility 1.12.0 Unity version: 2018.4.9 Vive Focus Plus TestScene:UGUI There is no problem in VR, but it is invalid in Unity

chengnay commented 4 years ago

@mimiky You mentioned invalid in Unity means you play on Unity Editor? What error message did you get?

mimiky commented 4 years ago

Yes, but there is no error message

chengnay commented 4 years ago

Did you use DirectPreview?

mimiky commented 4 years ago

Yes, I make sure I use it correctly

chengnay commented 4 years ago

@mimiky I manage to reproduce the issue on my side. I will fix it ASAP and provide you with solution, sorry for the inconvenience.

chengnay commented 3 years ago

@mimiky Simply update the WaveVRModule.cs to allow the trigger button to work. Line 498, currState.SetAxisValue(VRModuleRawAxis.Trigger, Mathf.Max(triggerAxis.x, triggerPressed ? 1f : 0f));

In Direct Preview mode, WaveVR_Controller's GetAxis API always return 0, so you will not be able to get TouchPad Axis value and also Trigger's Axis value.

mimiky commented 3 years ago

thank you!