New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get binding as a friendly user string #1017
Comments
Here is an old prototype video of our Tutorial that shows how it works today |
Unfortunately this is a bug we haven't been able to fix yet. I'll let you know when we get this fixed. |
@zite Thanks for feedback, cant wait to test this feature either in our tutorial :D |
I believe we have a function that will better suit your needs in the most recent beta. All in actions now have public string GetLocalizedOriginPart(params EVRInputStringBits[] localizedParts). It takes as many parts of the string as you want to get out, see the summary of the method for more info. This is in the 2.2b3 beta: https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.2b3 |
I will have a look at get back to you, thanks |
@zite Ok I tested both GetLocalizedOrigin and GetLocalizedOriginPart they give same error |
Looks like there's a bug with OpenVR where if the action hasn't been used yet it throws errors. Should still have a more friendly error message. Probably something better for inactive actions as well. |
@zite Thanks, that was the issue. I think it might be a bit restrictive to require the ActionSet and Action to be activated for it to work. I dont think it will be a problem for my in game tutorial because its flow driven, when you complete one task in the tutorial you will move to the next so the actionsets will always be enabled. But I could see a problem for someone that want to display the controls on a help me screen. There could be actionsets not enabled at that time. Sure you could enable all disabled sets, generate the help page than disable them again. Though, not a very ncie workflow. Again, not a problem for me currently. What is a problem though is that a action bound to Trackpad North only returns "Trackpad". That wont help a player to understand how he should activate the action sadly. |
So I saw that you are moving for release (RC2 is out) How about this feature? |
Unfortunately this is an underlying SteamVR issue which has releases separately from the unity plugin. |
Do you have any ETA when it will be fixed? We offcourse want to go live before Knuckles are released to the public |
btw @zite Its really not optimal that the actionset/action needs to be enabled for it to work. Its really fragile and creates timing issues easily. |
@zite hi again. Actually, its not a timing issue at all. I did some logging I grab the item and then upgrade its prio to 2 |
A quick note for the guys at openvr that starts to look at this. There are now two issues here. First, the GetLocalizedOriginPart returns "Trackpad" even if the action is bound to "Trackpad North". Second issue is that the action needs to be active for the GetLocalizedOriginPart to work, to me thats a bit counterintuitive, you might want to display all bindings in a help screen without any action sets being active for example. In my case I can live with it becasuse my tutorial is in-game and flow driven so the actions will be active when I call GetLocalizedOriginPart. The problem is there is a bug in openvr/unity-plugin so if I active the actionset and call GetLocalizedOriginPart in same frame it does not work. |
Hey guys any thoughts on this? While not a complete show stopper it's really not snappy for Vive wands players when they play the game the first time and any action bound to Track pad just says Trackpad instead of D Pad North or similar. Thanks |
And if the SDK could give us the underlaying ptr to the icon that would be a huge plus so we can present it in our UI. But for now, lets get the string representation to actually represent the binding :D |
@zite Any news on this? |
@zite Now when the release is close you really need to fix this. I just tested with latest beta of steamvr. And the bug remains. |
Bump. Just got feedback from a user that rightfully thinks that Trackpad is not helpful. |
We also bumped into this issue. GetLocalizedOriginPart returns a generic "Trackpad" instead of the specific direction the action is bound to. It also applies to actionset overrides. For example if we enable an actionset with a higher priority that has an action bound to the trackpad position it'll also disable all the DPad click actions, this doesn't happen if the lower priority action is a button click instead. |
+1 |
Did a quick check, is it possible to call it without changing vendor code? Seems to be internal stuff edit: OpenVR.Input.GetActionBindingInfo |
You should just be able to call it like this:
Then just use the |
Interesting, I get a NullReferenceException: Object reference not set to an instance of an object But it also sets the struct data correctly before null reference error |
I had the same issue originally. It was due to having a SteamVR binding on both controllers. So Jump was bound on the left and right controller. It for some reason doesn't like having duplicate bindings |
We use the built in priority system alot. For example the menu action has a lower priority than the weapon actions. So if you hold a gun with the Valve Index you cant bring up menu on that hand until you let go of the weapon. Meaning menu action will be on both controllers. Seems that the native function isnt stable enough for prime time |
Hey folks, I'll take a look at this and see what we can do. |
Is there any update on this? |
There's unfortunately a bug in that header file. I've updated the beta with a fix as well as easy access via action.GetActionBindingInfo(). https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.8.1b |
I'll give this a test tomorrow. Thank you for taking the time to look into it |
I'm looking into making our tutorial work with the new API, after looking into ValveSoftware/steamvr_unity_plugin#167 i fixed so the
GetDeviceComponentName
method returned what it should. I guess scroll_wheel is just a bug and it Should return touchpad.Lets say action Release magazine is bound to D Pad North. Then a text saying Touchpad wont do. Maybe you guys can add a method,
GetUserFriendlyDescription
which will return something like 'D Pad North' but maybe thats not enough, maybe it even needs to return "Touch D Pad North" or "Click D Pad North",edit: This is a fork from ValveSoftware/steamvr_unity_plugin#165
The text was updated successfully, but these errors were encountered: