openvr icon indicating copy to clipboard operation
openvr copied to clipboard

Action rebound event and command to bring up binding UI

Open AndersMalmgren opened this issue 5 years ago • 8 comments

So the user can rebind actions when the game is active, great, but we for example have menus etc that show info related to current bindings, we need to refresh this info when bindings are updated. Would be nice if we could subscribe to an event.

Also it would be really snappy if we could bring up the binding UI from the game for the user through some sort of command.

AndersMalmgren avatar Jan 15 '19 23:01 AndersMalmgren

we need to refresh this info when bindings are updated

Either https://github.com/ValveSoftware/openvr/blob/64fc05966a109543a1e191a45e1ab3a25a651211/headers/openvr.h#L663 or https://github.com/ValveSoftware/openvr/blob/64fc05966a109543a1e191a45e1ab3a25a651211/headers/openvr.h#L786 I think.

bring up the binding UI

https://github.com/ValveSoftware/openvr/blob/64fc05966a109543a1e191a45e1ab3a25a651211/headers/openvr.h#L4350-L4354 These are actually documented at the end in the wiki here. Note for both methods:

At the moment this function shows the entire binding UI, but that behavior will likely change down the road.

bddckr avatar Jan 18 '19 16:01 bddckr

Thanks will have a look

AndersMalmgren avatar Jan 18 '19 18:01 AndersMalmgren

Just got around to test this. Works like a charm. Thanks

@zite Would be nice if we had a wrapper for the OpenVR.Input.ShowBindingsForActionSet in the plugin though.

AndersMalmgren avatar Jan 28 '19 20:01 AndersMalmgren

As @bddckr mentioned, there are existing calls vr::VRInput()->ShowActionOrigins(...) and vr::VRInput()->ShowBindingsForActionSet(...) that address your other question. They both bring up the binding UI at the moment, but very soon they'll show much more user-friendly UI intended to show the user how to activate each action.

Do you want a method to point users at the screen to change bindings, or one to point users at a way to learn what the current bindings are?

JoeLudwig avatar Jan 31 '19 00:01 JoeLudwig

I prompt the user in our ingame tutorial if he wants to explore the Contoller Bindings UI. If he complies I use OpenVR.Input.ShowBindingsForActionSet to bring up the Bindigs UI. Works.

Though the methods are low level and my Request was for the Unity plugin to wrap the features in a more high level C# manner.

AndersMalmgren avatar Jan 31 '19 08:01 AndersMalmgren

OpenVR.Input.ShowBindingsForActionSet used to show the full binding UI, now it just shows

image

Which is a nice UI, but we also need a feature to bring up the entire UI so they can rebind their actions

AndersMalmgren avatar Feb 23 '19 15:02 AndersMalmgren

@JoeLudwig this no longer works no error code is returned. The UI does not display.

AndersMalmgren avatar Jan 27 '22 00:01 AndersMalmgren

Can confirm, with one thing to add: The UI does display if it's been displayed before in the SteamVR session. Getting the binding callouts to display from the controller settings works. And after triggering that manually, the API functions work as well for the session it seems.

Stab in the dark: Overlay system.vrwebhelper.bindingcallouts exists after the controller settings trigger the display, so perhaps it's not creating that from the public API functions when needed for some reason?

Edit:
As for when it broke or if it ever worked, I have no idea. Hadn't used those functions before. If it's of any help, the behavior is the same on the oculus_win7and8 1.15.12 branch, so I guess it's been like this for a while?

elvissteinjr avatar Feb 07 '22 02:02 elvissteinjr