VR Expansion Plugin

You can just disable the module, you need to disable the engines steamVR module as well for it to not ship the binaries though. As for the nodes, unlinking them for the oculus build should be enough, though generally you would likely want to keep a seperate blueprint for the oculus and non oculus versions.

There really shouldn’t be much that you would be using the openVR specific module for though, generally controller properties and rendering overlays are the main use of it, shouldn’t be too hard to seperate that out for the seperate builds.

Also there is no such thing as OpenVR based on oculus…OpenVR can work with oculus, but oculus doesn’t let you even have the binaries in your package when uploading to their store to ensure that it is on its native platform.

Okay, that’s for the info. I just go through the process of removing all reference to part for the oculus build. Sounds easy enough.

Hi –

I have two one questions when you get a chance! – (answered my own first question - I was missing one of the input events, I’m an idiot)

1st –
I saw your response a few months ago about changing controller inputs for rotation and I figured out how to get that working (both smooth and snap)

What I’m wondering is - how can I actually use a hover version of that? Seems like the incoming Axis Value for ->InputAxis ControllerMovement is based on Pressing the pad (I’m using vive controllers), so it won’t register as > 0 if hovering.

Seems like maybe the hover settings are somewhere in the Motion Controller Component script? I’m only … let’s say “intermediate” level for C++ and while I did find a couple references (when “Searching”) for “hover,” I didn’t spot anything obvious.

Tips / suggestions?

2nd –
I THINK I have a solution for but trouble-shooting… and it’s not quite getting me there…
Can I force-call a grab on a controller?
The example- I want to use a secondary Grip for a 2-handed weapon. However, that grip also needs to be a slider (shotgun pump, in case).
My thought was - have the Grip action go to the secondary grip socket for the weapon. Then, on TRIGGER pull for the second hand, actually use the Blueprint to force the grip over the slider (which would be in the exact same spot, so visually the hand wouldn’t move), to allow for the Slider to move… then when the TRIGGER is released, for the grip back to the Secondary Grip socket.

Thanks in advance, I realize it’s not always easy to find time to answer questions!

If you are secondary gripping the object anyway then its kind of a waste to also grip the slider, if you don’t want to run custom logic to move the slider though with it then yeah its a viable method.

As for manually gripping, call GripObjectByInterface from the controller and pass in the object you want to grip.

I’m fine doing some custom logic, but am not sure how to approach simultaneously use secondary grip… but then ALSO allow the slider to be used as a shotgun pump while keeping the secondary grip active. Does that make sense?

Got it! Mostly…

Secondary grip on weapon works…
On trigger pull, grip then also grips the slider

Final question…

On sliders, is there a way to “start” the slider movement based on relative location of the motion controller?
As you can see in the video - when I pull the trigger, the slider Jumps to the MC’s location…

Thanks SO MUCH for your quick reply, also! I wouldn’t have found that without you pointing in the right direction!

EDIT –
ok I’m answering my own questions again, which makes me come off pretty needy…
I need to do an offset with the Grip Object.

I’ll try and find the right offset and re-ask if I can’t figure it out

If you pass in the current controller transform it should already start offset, you were likely passing in a zero transform.

I would like to make a note to myself for the next time I attempt to install the template or for anyone else that is very unfamiliar with VS like myself and makes a similar mistake. is the second time I encountered problem and I had stupidly forgotten the solution. apparently was caused by me unzipping and attempting to build the project in a folder on my desktop that had a space in it C:\Users\XXXXXX\Desktop\VRplugin commits\4.22-vrexppluginexample-8529…etc. Here is the log:


1>------ Build started: Project: VRExpPluginExample, Configuration: Development_Editor x64 ------

2>------ Skipped Build: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------

2>Project not selected to build for  solution configuration

1>Creating makefile for VRExpPluginExampleEditor (no existing makefile)

1>Parsing headers for VRExpPluginExampleEditor

1>  Running UnrealHeaderTool "C:\Users\XXXXXX\Desktop\VRplugin commits\4.22\-vrexppluginexample-8529aa16f674\VRExpPluginExample.uproject" "C:\Users\XXXXXX\Desktop\VRplugin commits\4.22\-vrexppluginexample-8529aa16f674\Intermediate\Build\Win64\VRExpPluginExampleEditor\Development\VRExpPluginExampleEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed

1>Reflection code generated for VRExpPluginExampleEditor in 6.3635624 seconds

1>UnrealBuildTool : error : Unhandled exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\XXXXXX\Desktop\VRplugin commits\4.22\-vrexppluginexample-8529aa16f674\Plugins\VRExpansionPlugin\OpenVRExpansionPlugin\Intermediate\Build\Win64\UE4Editor\Development\OpenVRExpansionPlugin\Module.OpenVRExpansionPlugin.gen.cpp.obj.response'.

1>                           at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

1>                           at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

1>                           at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

1>                           at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)

1>                           at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)

1>                           at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)

1>                           at UnrealBuildTool.FileItem.CreateIntermediateTextFile(FileReference Location, String Contents) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\FileItem.cs:line 224

1>                           at UnrealBuildTool.VCToolChain.CompileCPPFiles(CppCompileEnvironment CompileEnvironment, List`1 InputFiles, DirectoryReference OutputDir, String ModuleName, List`1 Actions) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Windows\VCToolChain.cs:line 1109

1>                           at UnrealBuildTool.UEBuildModuleCPP.CompileUnityFilesWithToolChain(ReadOnlyTargetRules Target, UEToolChain ToolChain, CppCompileEnvironment CompileEnvironment, CppCompileEnvironment ModuleCompileEnvironment, List`1 SourceFiles, List`1 Actions) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModuleCPP.cs:line 788

1>                           at UnrealBuildTool.UEBuildModuleCPP.Compile(ReadOnlyTargetRules Target, UEToolChain ToolChain, CppCompileEnvironment BinaryCompileEnvironment, ISourceFileWorkingSet WorkingSet, TargetMakefile Makefile) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModuleCPP.cs:line 470

1>                           at UnrealBuildTool.UEBuildBinary.SetupBinaryLinkEnvironment(ReadOnlyTargetRules Target, UEToolChain ToolChain, LinkEnvironment LinkEnvironment, CppCompileEnvironment CompileEnvironment, ISourceFileWorkingSet WorkingSet, DirectoryReference ExeDir, TargetMakefile Makefile) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildBinary.cs:line 684

1>                           at UnrealBuildTool.UEBuildBinary.Build(ReadOnlyTargetRules Target, UEToolChain ToolChain, CppCompileEnvironment CompileEnvironment, LinkEnvironment LinkEnvironment, ISourceFileWorkingSet WorkingSet, DirectoryReference ExeDir, TargetMakefile Makefile) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildBinary.cs:line 172

1>                           at UnrealBuildTool.UEBuildTarget.Build(BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, Boolean bIsAssemblingBuild) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 1297

1>                           at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 428

1>                           at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 218

1>                           at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 191

1>                           at UnrealBuildTool.UnrealBuildTool.Main(String] ArgumentsArray) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 443

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""X:\Unreal Engine\UE_4.22\Engine\Build\BatchFiles\Build.bat" VRExpPluginExampleEditor Win64 Development -Project="C:\Users\XXXXXX\Desktop\VRplugin commits\4.22\-vrexppluginexample-8529aa16f674\VRExpPluginExample.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run  command.

1>Done building project "VRExpPluginExample.vcxproj" -- FAILED.

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========


You’ll also want to get rid of that nasty auto generated folder name, it will drag the file name length out too long depending on install location.

Updated a few of the usage projects on the list, the main one being EspireVR which should be launching month.

Also wanted to point out feature fix for SteamVR in 4.23:

Hi did the new method will a
be also available for an oculus rift controller or is specific to steamvr?

Rift never had the issue, though if you were running rift through the steamVR plugin then yes, it would help.

Just a quick question for anyone that tried 1:1 roomscale VR with plugin. I have two headsets in the same room, and I am positioning them to stay face-to-face in real life , but in-game they have a 90 degrees yaw rotation.

In picture the arrow represents the direction the players are looking towards in game, and the red and blue lines represents the FOV of each player.

I am using VRBase Character as my base, and for the VRReplicatedCamera I have SetPositionDuringTick enabled(tried with it disabled aswell), and AutoSetLockToHMD enabled.

VRBaseCharacter is not a usable character, the class even notes in its description. It is the base class for the other two character classes so that they can share base implementations of some things, though with roomscale only you likely wouldn’t notice for the most part. Generally though you should be using the VRCharacter class for what you are doing.

As for the facing, that is dependent on the room space setup being matched between the two headsets, your forward direction is likely off in the initial calibration (I assume steamVR here, it is harder to match up tracking universes outside of it without in app calibration).

You can either clone the tracking space calibration between them (steamVR) or you can run in application calibration to sync them up (place a tracker in a specific spot or some other such method).

Hey I’m kinda dumb, so um,I thought these were all blueprints? I installed it and I just have folders that say C++ plugins??
Help?

Hey, I’m trying to figure out how to get the VRCharacter class rigged up with a SkeletalMesh, but I’m having difficulties figuring out the best way to do it. I’d like to get the VRReplicatedCamera to be attached to the head bone in my skeletal mesh and the motion controllers attached to the hands. However, it doesn’t seem like I can just detach the inherited camera and motion controllers and then attach them to my skeletal mesh.

I can use my character’s Tick to make the head and hand bones follow the camera and motion controllers. That route seems possible, but it still seems like there’s a better approach. I’m just looking for the most maintenance friendly path for adding skeletal meshes to the VRCharacter class. Do you have any suggestions? I’m not looking for anything perfect, but reasonable at the least.

Its a c++ plugin with a blueprint example template for implementation reference for those that don’t use c++, its actually not possible to pull many of the features off only in BP. You shouldn’t have to touch c++ to use it though, but you WILL have to learn to compile to it unless you really restrict yourself to the pre-packaged binaries.

Why would you want the motion controllers and camera to be attached to a skeletal mesh? That is entirely besides the point of what they exist for, the motion controllers and the camera track to the VR systems tracked space, generally you want other things to follow THEM, not the other way around.

You should be adding the skeletal mesh to the ParentRelativeComponent (set to foot mode for it to be locked to the floor) and using an animation blueprint with IK nodes or an IK plugin to rotate the bone chains to follow the camera and controllers. There are some marketplace VR IK solutions available if you want a shortcut, I cannot attest to their individual quality though.

I get that attaching them to the skeletal mesh seems kind of backwards, but I got the idea from some forum thread ([TUTORIAL] Super-easy VR body with arm IK and thumbstick locomotion [with download] - XR Development - Epic Developer Community Forums). Someone in that thread said that they got the solution to work with the vr expansion plugin, but I’m not sure how they did it.

I currently have my mesh attached to the ParentRelativeComponent, thanks for that clarification. Thanks for pointing me to the animation blueprints as well. That seems nicer than just using the character Tick.

P.S. People sometimes interpret all caps as yelling. I did that one time when I first broke into the software industry and got an ear full from a coworker. You probably shouldn’t do that if you want to come off as “professional”.

I guess I should have also mentioned that I’m trying to get something figured out for VR and nonVR setups. After thinking about it more it seems like the animation blueprints could be used for the VR and nonVR cases. I really liked your FPS_VivePawnCharacter blueprint because it was a nonVR character that emulated a VR character. In the same spirit, the keyboard/mouse/gamepad controls could control the positioning of the HMD/controllers. That would then allow the same IK animation blueprint system to be used for the nonVR case.

I’m far from mastering UE4. I might be a bit off, but those are my ideas so far. Let me know what you think if you have any thoughts.

I found a pretty neat IK project on Github. I learned quite a bit about the IK animation blueprints. The project seems abandoned, but there’s a pull request for some 4.2x compile errors. I got it working with 4.23 pretty easily. All you other people might be interested.