ViveSoftware / ViveInputUtility-Unity

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

HTC vive touch pad inputs #65

Closed junglee372018 closed 5 years ago

junglee372018 commented 5 years ago

Hi I want to implement radial menu using the ViveInputUtility plugin. Tried so many ways to get touchpad axis values but couldn't get the values.

Kindly help me in getting touchpad axis values.

Thank you.

chengnay commented 5 years ago

Can you provide below information, Which Unity version? Which SteamVR Plugin version? Which VIU version?

junglee372018 commented 5 years ago

Unity v2018.1.6f1 and viveInputUtilities plugin v1.9.0

do we need to include steamVR?? because if we import steamvr plugin basic UI and teleport are not working. we tried importing steamvr 2.0

chengnay commented 5 years ago

Did you try out the UGUI example scene? The scroll view you can simply use the trackpad to move around. You need to allow the pointer pointing at the scroll view.

chengnay commented 5 years ago

I wrote a sample code that you can print out the axis data when you touch on the Touch Pad. if (ViveInput.GetPress(HandRole.RightHand, ControllerButton.PadTouch)) { Debug.Log("padAxis = " + ViveInput.GetPadAxisEx(HandRole.RightHand)); }

You can try to have above code place inside the Update() function and see if it works.

junglee372018 commented 5 years ago

Yes, i have tried UGUI scene. In that scroll view is working automatically, no script attached to detect the touchpad inputs. i want to read the touchpad vector values in order to work with radial menus this.

junglee372018 commented 5 years ago

I wrote a sample code that you can print out the axis data when you touch on the Touch Pad. if (ViveInput.GetPress(HandRole.RightHand, ControllerButton.PadTouch)) { Debug.Log("padAxis = " + ViveInput.GetPadAxisEx(HandRole.RightHand)); }

You can try to have above code place inside the Update() function and see if it works.

yeah, it worked.

Thank You