Skip to content
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

SteamVR beta 1.4.1 breaks proximity sensor support through the SteamVR Input API #1096

Closed
muchcharles opened this issue Apr 17, 2019 · 5 comments
Assignees

Comments

@muchcharles
Copy link

muchcharles commented Apr 17, 2019

SteamVR beta 1.4.1 seems to have broken the ability to do a generic headset binding for the proximity sensor through SteamVR input (and when SteamVR input is active the legacy way to check the proximity sensor doesn't work). On the prior version this binding would work regardless of headset brand, so long as it had a sensor:

{
	"name": "Default bindings for Generic HMD",
	"controller_type": "generic_hmd",
	"bindings":
	{
	 "/actions/main" : {
          "sources" : [
            {
               "inputs" : {
                  "click" : {
                     "output" : "/actions/main/in/generic_hmd_proximitysensor"
                  }
               },
               "mode" : "button",
               "path" : "/user/head/proximity"
            }
	  ]
	 }
	},
	"description": ""
}

The action's bActive and bData now always return false starting in 1.4.1. I can give you a reproducing steam app id if needed.

I tested on stable and things work fine. The prior beta before 1.4.1 worked fine too.

@muchcharles
Copy link
Author

muchcharles commented Apr 17, 2019

It works if I manually add a binding for a specific headset, but doesn't work with generic_hmd anymore. This is crucial, because there is no way to know the names of every headset out there and new ones can arrive frequently in the future (e.g. no idea how to even add a binding for the Index at this point). Things worked perfect before with controller_type generic_hmd.

@Mahallon
Copy link

Has there been a fix for this? @muchcharles I tried manually adding a binding for the index and its not working, How did you add the binding manually?

@muchcharles
Copy link
Author

muchcharles commented Aug 30, 2019

@Mahallon at one point they broke generic_hmd.json bindings so you had to make a specific one for each headset, but I think they've fixed that. Add:
generic_hmd.json

{
	"name": "Default bindings for Generic HMD",
	"controller_type": "generic_hmd",
	"bindings":
	{
	 "/actions/main" : {
          "sources" : [
            {
               "inputs" : {
                  "click" : {
                     "output" : "/actions/main/in/generic_hmd_proximitysensor"
                  }
               },
               "mode" : "button",
               "path" : "/user/head/proximity"
            }
	  ]
	 }
	},
	"description": ""
}

or Index-specific:

index_hmd.json

{
	"name": "Default bindings for Valve Index HMD",
	"controller_type": "index_hmd",
	"bindings":
	{
	 "/actions/main" : {
          "sources" : [
            {
               "inputs" : {
                  "click" : {
                     "output" : "/actions/main/in/generic_hmd_proximitysensor"
                  }
               },
               "mode" : "button",
               "path" : "/user/head/proximity"
            }
	  ]
	 }
	},
	"description": ""
}

@Mahallon
Copy link

Mahallon commented Aug 30, 2019

Thank you for such a quick reply!

did you also have to include something like
{ "controller_type": "index_hmd", "binding_url": "bindings_index_hmd.json" },

to the actions.json file or does it do that during the generation function?

EDIT: I did try to add a indexhmd.json file (without the _ ) but that didn't work for me so can you tell me where you added it? also If it makes any difference I am using Unity

@muchcharles
Copy link
Author

muchcharles commented Aug 30, 2019

Yeah you have to have it in the overall manifest, I'm using UE4 where if I remember right that is automatically generated (I think I had to maybe modify a source file that generates it to add it to the list). I'm not sure about unity.

Stick to generic_hmd if possible because it should work for vive, oculus, and any future HMD with a proximity sensor. You also may want to query if the proximity sensor is bound, so you can fall back to activity level (digital action data's bActive tells if it is bound), this is needed for headsets like Pimax without proximity sensors. I'm pretty sure they did eventually fix this bug, though I still have the index bindings in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants