• Godot HelpProgramming
  • Is there a way to get better button mapping on something like Valve Index controllers?

Hello there,

I'm basically experimenting with Godot and VR using a Valve Index, and already toyed a bit with https://docs.godotengine.org/en/3.1/tutorials/vr/vr_starter_tutorial.html where I followed the tutorial and implemented each example script in Rust.

My issue comes from the way I get input on ARVRControllers. I know there are signals, but ultimately they give the same kind of information as just polling arvr_controller.is_button_pressed(int). On a Valve Index controller, for some reason pressing button A returns 2, which is the same code as the grip... This is problematic to say the least.

In most VR games available on Steam, we can edit bindings on the controllers, is there a way to tap into the same system and make use of that in Godot? Or is it a limitation of https://github.com/GodotVR/godot-openvr-asset? Or is it a problem with SteamVR's support of OpenVR?

I'd like to better understand the state of things regarding VR support in Godot, notably with inputs in this case.

I'm not super experienced in VR and Godot, but I do not think there's been any changes recently that have changed input mapping, and I'm unaware of any way to edit the bindings in Godot. I could be wrong, but I also do not think its possible to bind VR controller input to the input mapping system (like Input.is_action_pressed) either.

It looks like there is a couple VR input related proposals though, so hopefully in the future Godot VR input will be easier to handle.

@TwistedTwigleg thanks for the answer!

To be honest having VR buttons bound into the input mapping system feels secondary to me as my primary issue is the actual lack of inputs :(

Thanks for the links!

Ah, my bad, I misinterpreted the issue. If the VR controller is missing inputs, I would suggest making an issue on GitHub if there isn’t one already as it sounds like a bug.

10 days later

Ok, so turns out the public VR primer tutorial is simply very basic.

I managed to find what I was looking for here: https://github.com/GodotVR/godot_openvr/tree/master/demo

I still need to sit in front of the different parts, but the result allows one to use all buttons as well as link everything through the input mapping system, and even works with Steam's controller bindings UI!

2 years later