accept nonstandard "grab" input slot in button mode (fixes #266) - #399
Open
skryvel wants to merge 1 commit into
Open
accept nonstandard "grab" input slot in button mode (fixes #266)#399skryvel wants to merge 1 commit into
skryvel wants to merge 1 commit into
Conversation
Some games (e.g. Half-Life 2: VR) bind grip grab with mode "button" and a "grab" input slot instead of "click". SteamVR treats it like click, so translate it the same way, which on force-less controllers like Oculus Touch resolves to squeeze value with the click thresholds. Fixes Supreeeme#266
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #397 as its own change.
Half-Life 2: VR binds grip grabbing with
"mode": "button"but puts the output under a"grab"input slot rather than"click":{ "mode": "button", "path": "/user/hand/left/input/grip", "inputs": { "grab": { "output": "/actions/interact/in/grab" } }, "parameters": { "click_activate_threshold": "0.8", "click_deactivate_threshold": "0.8" } }ButtonInputonly knewtouch,clickanddouble, so the slot was dropped during deserialization and the action was left unbound. SteamVR accepts it, which is why the game ships bindings written this way.Before: grabbing does nothing — objects cannot be picked up at all, and the game's own tutorial hints report the action as unbound.
After: the
grabslot is translated likeclick, which on force-less controllers such as Oculus Touch resolves to squeeze value with the thresholds from the binding file. Picking things up works.Covered by
grab_slot_in_button_mode_oculus, with binding files matching the shape the game ships. Tested with Half-Life 2: VR on a Quest 3 over WiVRn.Grabbing with right hand.
