Do DPad Inputs on the Vive Controller Work?

I’ve used k_EButton_SteamVR_Touchpad and that works fine. But then I have to run an If statement to determine where on the touchpad the player is pressing. I’m only using the touchpad as 4 buttons so I tried rewriting the script to use k_EButton_DPad. I thought it would be a little more efficient but I’m not getting any response.

I’ve read elsewhere that DPad is not used yet. I read the same for the Axis input. That these IVRButtonIDs were put in for future use.

That seems strange to me. Is this true? Does anyone know if the DPad command works? If so, can you show me a quick script to make it work? Thanks.

There’s no DPad on the Vive controllers, so why would the class misrepresent the touchpad as one?

If this phrase enters your mind, and you haven’t profiled and found that something is an issue, then don’t do it. Pre-optimization leads to many an unnecessary headache. Converting a Vector2 into a four-quadrant set of bools is trivially fast. Calling transform.position once is generally going to be 10-20 times slower than that conversion, and we do that without batting an eye.

If you want to use the touchpad as a dpad then you need to interpret the touch vector and figure out what imaginary button they’re pushing.

Ah, okay. I thought the DPad and Touchpad were the same thing, with DPad being on press and Touchpad being on touch. Do you know why that input is an option if the buttons don’t exist?

I respectfully disagree, especially if you are collaborating and someone else needs to be able to read your scripts and how your project is set up.

I believe asking yourself “Is there a simpler way to write this script?” is a healthy question.

Cheers.

You cited efficiency as your reason, not script readability.