Valve's SteamVR Input Plugin

I’m on engine version 4.22.3 running oculus SDK and steamvr. I allow the launcher of the application to select oculus home or steamvr during launch via parameters. After moving to the SteamVR input I’ve noticed that the Oculus SDK input bindings are no longer available and all that I’m showing is “SteamVR Oculus” bindings. This is ok since I’m fine with simply moving completely over to steamVR for this application and dropping native home support so it isn’t a deal breaker. The problem that I do have however is that there is literally nothing on the steamvr input page to explain how to set the application default binding settings as a developer in a way that will have the inputs, thresholds, haptics etc setup and ready to go upon launching the game after published. There also isn’t any information regarding how to deal with these saved steamvr bindings across source control such as perforce. The Steamvr Input directory only seems to store the engine bindings to steam vr binding relationship and not the actual adjustments that have been made in the web interface??? Any advice on this would be great as I currently have the project checked out and I’d like to complete this and push the commit in a way that is functional for all of the guys working on this instead of breaking the inputs for everyone. I’ve loaded up each hmd (Oculus, Vive, Index, WMR) and I have the bindings saved but it’s not replacing the “official bindings” its saving as a local binding.

I’m having the same issue with Oculus and Index controllers. I just pulled my recent changes on another machine and the thumbsticks don’t work on either. All the other buttons work fine though. I can go into the bindings dashboard and set them up again but what will happen when the project is shipped? I don’t think it’ll keep these adjustments?

Does your project have a Project Name in the Project Settings? SteamVR in the other machine may be identifying them as as another UE project. You can remove any entries with “ue” in {program files} \ steam \ config \ steamvr.vrsettings to reset.

To be able to overwrite the bindings generated by the plugin, you need to enable Advanced Settings in SteamVR:

Then under the Developer tab, enable debugging options:

Then in the SteamVR Bindings dashboard you should have additional buttons available:

**“Replace Default Binding” **is the button you need to update the plugin generated jsons. You can also of course jsut copy any personal bindings in you Documents folder to the config\ SteamVRBindings folder.

If you’re using git, the the merge should be pretty straightforward. if you’re using p4, you’ll need to check out the files. So pretty much like any other source code in your repository. You should be able to safely exclude the **steamvr_manifest.json **and **steamvr_ue_editor_app.json **files in your VC.

Hope that helps!

Yeah, it has a project name already. I also tried “Replace default binding” but no difference. Just noticed I have to Regenerate Action Manifest or the controllers aren’t even tracking. Once I do this everything works apart from the thumbsticks.

edit: Ok, I think I got it to work in a shipping build, that’s all that matters I guess. The bindings still don’t work when loading the project on another machine but at least that’s fixable by going through the dashboard.

For the Thumbsticks – Make sure your corresponding axis actions have _X & _Y at the end of their names. Then regen both Action Manifest and the Controller Bindings.

For the other machine, check if you have any errors in the UE4 Console… Particularly with [STEAMVR] entries and regarding the Action Manifest loading

It seems that GetControllerOrientationAndPosition for motion controllers doesn’t work in packaged build with vive trackers.
I. e.:

  1. one controller turned on - fine.
  2. seconds controller turned on - fine
  3. first Vive Tracker turned on - GetControllerOrientationAndPosition returns zeros for motion controllers.

Although, I didn’t check it in a blank project.

Yeah, they do have _X and _Y on the end. I just regenerated action manifest and bindings and it told me that they’d been edited from the dashboard and I’d lose my changes. Now the thumbsticks don’t work again so I have to go through each controller in the the dashboard and fix them again ah man…

Instead of doing it in the dashboard, back up your current bindings, then in the UE Inputs – add all the specific controllers (e.g. Index Thumbstick X, Vive Trackpad X, etc) instead of the Motion Controller abstraction you got there. The action names look fine.

I am having a very similar problem. I am working on a project with both Oculus and SteamVRInput on 4.22.3 and everything works fine in the editor or even targeted launches through the built editor. But when I try on a packaged build GetPoseActionDataForNextFrame always errors out resulting in no positional data being given to the UMotionControllerComponent and my hands are stationary. All of the other inputs are working fine, every thumbstick, all the buttons, all the grips, etc. Its just this data that is missing.

I am technically only ever checking the Left/Right hand handles and something in the back of my mind is telling me the template example project is showing this data on one of the VR Speicals (like Special8 or something instead of a specific hand) that makes me wonder if there is some translating that is going on but not in a packaged build. This has just been vexing me for over a week now and the track has gone cold into the OpenVR dll and I can not figure out/find the log files from it.

So unoptimizing the file and logging some info I have found out that this seems to be telling em WrongType (again this is only in a packaged build) I found an old issue on the github repository (https://github.com/ValveSoftware/ste…ugin/issues/49) that seems to be explicitly what I was seeing. I have checked the source code and versions and we are definitely using the latest version which has the fixes for this in SteamVRInputDevice.cpp. I am now grasping at straws as to what is going on and why its only on builds and not in the editor. Is anyone else running into this??? (I do have a build I will test out tomorrow that passes the sizeof(struct type) vs sizeof(variable) just on the off case that helps as semi-eluded to here GetPoseActionData returns VRInputError_WrongType · Issue #847 · ValveSoftware/openvr · GitHub just in case this is an issue between the editor and a build and will report on that when I give it a go EDIT: Made no difference).

HI @anonymous_user_2c1a33d3 - is your issue with Vive Trackers as well similar to Yuri’s?
@YuriNK - Sorry I missed your message, just tested using a modified version of our sample project:

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

And tested on a 64-bit build, tracker and controllers all were tracking properly. Let me know if you’ve done any more investigation on this and if you can test the sample projects on your end as well.

Cheers,
Rune

I’m testing the SteamVRInput plugin to get the fingers to work with a custom setup I’m working also using Vive Trackers.

Well, looks like that if the plugin is enabled, the Vive Trackers are not tracked at all.

Vive Trackers are set as usual ( Special1, Special 2, and so on ), and as soon as I disable the plugin, everything works as expected.

[USER=“3336098”]Valve Corp[/USER] and @YuriNK are you experiencing the same issue? because is very important for me to have those working together.

Sorry I have been quiet I was swapped to other priorities but a second set of eyes seems to have tracked down the difference. In the editor the plugin is referencing 2 versions of the OpenVR DLL. It works. When a build is done the lines to include the DLL for runtime in the build.cs file are commented out, so the second DLL was never included in them and there is a sizeof() missmatch of the struct between the two versions, hence it looking like the issue from back in September where the wrong size was passed in and WrongType, the error that we are seeing, is returned. Will continue to investigate but that is our current findings.

Thanks for the update. Please note the latest dlls aren’t used by the plugin, they are included for those who may want to use them directly via C++. The plugin itself uses a slightly customised openvr header to allow us to use latest openvr calls without having to update the engine’s dll.

Hi @EnterReality - you need to configure the Vive Trackers in the Input System on the SteamVR Dashboard. This issue thread might help:

Has anyone solved the issue of nodes disappearing on engine launch? I am using the “SteamVR Skeletal Anim Pose” node in the hand AnimBP after upgrading from 4.23 to 4.25 and cleaning all of the saved/intermediate/binaries folders. When I open the project, the editor launches with a load error of “Failed to load /Script/SteamVREditor.AnimGraphNode_SteamVRInputAnimPose Referenced by AnimGraph”. I need a better solution than the one that was mentioned before for having to create new blueprints just to be used with the motion controllers.

I have trouble finding where the wrist or middle of the palm is. I’m using the index controllers and followed the setup guide posted here on the forums and used the SteamVRAssets assets.
On the left of the following image you can see how the BP has an axis mesh at the origin indicating the actor location. In game however the hand is offset.

image.jpg

I queried the world locations of the MotionController actor, the axis mesh, the HandMesh SK mesh comp and its root bone, but all give the same value, although they are clearly not at the same place… I’m quite confused, any tips?

EDIT: By trial and error I found the approximate, hand mesh relative locations for the palm and wrist:
Palm: (X=-12.000000,Y=0.000000,Z=0.000000)
Wrist: (X=-18.000000,Y=-2.500000,Z=4.000000)
Are these values significant in some way?

Hi @ZoltanE - Is any of the animation nodes running on this actor as well? Also, are the sample projects we published working properly on your end?

I’m using a barebones version of the “SteamVRInputPlugin_UEIntegrated” project, so the ANIM_Glove_Left and right anim BPs are running.
Everything works well, I didn’t do anything and the fingers are animating properly. :slight_smile: There is nothing obviously wrong, I was just confused by how the tracking location is somewhat removed from the hand mesh.
I’ve just checked the original “SteamVRInputPlugin_UEIntegrated” project and the situation is the same.