openvr
openvr copied to clipboard
Action rebound event and command to bring up binding UI
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.
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.
Thanks will have a look
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.
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?
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.
OpenVR.Input.ShowBindingsForActionSet
used to show the full binding UI, now it just shows
Which is a nice UI, but we also need a feature to bring up the entire UI so they can rebind their actions
@JoeLudwig this no longer works no error code is returned. The UI does not display.
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?