ValveSoftware / steamvr_unreal_plugin

SteamVR Input Unreal Plugin - Documentation at: https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki Sample project (UE4.15-4.23): https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin.zip Sample Project (UE.424+): https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin_UEIntegrated.7z
Other
167 stars 29 forks source link

4.24 - can't remove joystick click parameter from default binding on index knuckles #140

Closed protowlf closed 3 years ago

protowlf commented 4 years ago

I have a fresh UE4.24 VR Project, and I'm running into bugs configuring joystick direction bindings with the Index Knuckles. I'm trying to mimic HL Alyx's joy stick bindings for teleport, turn left, and turn right, using the joystick as a dpad.

Context: In my Unreal Project Settings, I bound my actions to "Valve Index Thumbstick direction [Up/Down/Left/Right]". This writes to knuckles.json setting the joystick as a dpad, using the "sub_mode: click" parameter (i.e. you must move the joystick in the direction AND click it in). I do not want the click parameter, so (as far as I could tell) my only option is to manually edit the .json to remove it.

The Issue: After I manually remove the "click" parameter in the .json file, when running the game in Editor with VR Preview, the the binding is still requiring me to click the joystick. If I use the steamvr dashboard to edit the default binding and make no changes, it displays the joystick dpad as "touch" (not "click"), and then it works correctly in game. If I set my binding back to default, it once again functions as click.

I also tried replacing the click parameter with touch in the .json. This resulted in fixing the default binding, but the steamvr dashboard then never let me edit bindings again (it does nothing when I try to switch off of default). Not sure if this is a problem with my json formatting or what, but felt it was worth mentioning.

Is there something else I need to do to remove the click parameter from the default binding? Or is this a bug?

Bonus side-issue: I think it's a poor choice to have the thumbstick direction bindings default to the click parameter. It's not the behavior most games would want. Having to manually edit the generated json is also bad, because it could easily get reset by the Unreal editor by accident. It would be nice to have multiple bindings in Unreal for joystick dpad click vs touch.

protowlf commented 4 years ago

Update, it seems the bit about steamvr dashbooard not letting me edit bindings might be unrelated? Rebooting steamvr got me past that issue.

I'm speculating that my original issue may have been editing the .json to set the joystick to dpad with NO parameters. With the sub_mode: touch parameter I think I have it working correctly!

My Bonus side-issue still stands, however. This workflow is pretty rough!

1runeberg commented 4 years ago

@drspud - it may not have made it in 4.24.3, there's a fix for dpad clicks and touches as well as expanded support for dpads in 4.25 preview.

Epic maintains a version cadence we need to follow so we can't add anything to 4.24 unless there's a new hotfix coming up and depending on the nature and intention of the hotfix (e.g. crash fixes only), we may or may not be able to include anything for the plugin/input module.

protowlf commented 4 years ago

I see. Thanks for the update!

lyonb96 commented 4 years ago

Any update on the status of this? I'm using 4.25.0 and still having a lot of confusion over what should be an extremely simple part of project setup.

Thumbstick X/Y do nothing. Thumbstick Touch does nothing. Thumbstick Up/Down require me to click for it to work which I do not want. Thumbstick also requires me to click and doesn't seem to give any sort of directional feedback as far as forward/backward.

What is the proper way to just get regular non-click thumbstick input as a binding?

Edit: Figured this out after a while of playing around. The solution that worked for me was to create 3 Axis Bindings in UE4: One called MoveForwardRight, one called MoveForward, one called MoveRight. The first one (MoveForwardRight) has both the Index L Thumbstick X and Y axes as axis mappings. MoveForward only has Y, and MoveRight only has X. Then regenerate and reload bindings, and possibly go to the SteamVR controller binding page and map "MoveForwardRight" to the Thumbstick as Joystick Position. Very little to none of this was in the documentation, or if it was, I couldn't find it anywhere.

1runeberg commented 4 years ago

hi @lyonb96 - Unfortunately some of our pull request items didnt make it to 4.25 but they have been scheduled for 4.26 instead including the fix for the thumbstick click..

They can still be merged manually if you have custom engine build: https://github.com/EpicGames/UnrealEngine/pull/6749

For the thumbstick axis mappings, they are documented here: https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/Quickstart

Further, our sample projects have sample mappings that does thumbstick axes: https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin_UEIntegrated.7z

You can also manually remap the thumbstick click in the SteamVR Dashboard (after creating hte appropriate thumbstick axis actions as detailed in the quickstart. Please note naming requirements.

1runeberg commented 3 years ago

This has been fixed in 4.26, thanks for reporting!