VR Expansion Plugin

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.

's tutorial didn’t attach tracked devices to the skeletal mesh either, he ran base IK nodes to the relative positions. As for how they got it working with VRE, the same way, attaching to the parent relative component and running IK.

As for the FPSPawn, that is mostly for out of VR testing as you don’t have to make code changes and can test with parity, I wouldn’t suggest using a VRCharacter for FPS unless it is really required due to the additional overhead, if you must then at least you would want to turn ticking off on the root capsule (template fps pawn has it on for replication and depenetration testing emulating room scale).

I know of a few games using a vrcharacter for AI as well as the player and possessing back and forth between them, but its just something where you would want to profile heavily. Some parts of the VRCharacters are actually cheaper than the stock characters, but there are a lot more ticking elements due to the trackers and root offset and some of the movement logic is switched around to avoid extra costs that VR doesn’t need that may effect FPS behavior (mouse latency).

P.S: Caps is a dirty habit I picked up for word emphasis in text boards where there was no underlining back in the day, here underlining could work so i’ll try to remember to use it, but you likely shouldn’t read too much into text formatting.

Thanks, I understand what to do now.

Hi all,
i have slight problems understanding how to get hold of the c++ sources from https://bitbucket.org//vrexpansionplugin/src/Master/ (the ones you put into a project and then compile them by yourself) and at the same time also get all the stuff implemented in blueprints and the example levels from https://bitbucket.org//vrexppluginexample/src and/or the exampe binaries. While i managed to compile the vrexpansionplugin source for version 4.20.3 i could not do so for the current source at vrexppluginexample https://bitbucket.org//vrexppluginexample/src/default/. I suppose is because the latter are meant to be used for the newest engine version of 4.22?

So to sum it up: I would like to have full access to the c++ stuff as well as to the example blueprints and levels from vrexppluginexample. And all of that for engine version 4.20.3. Could someone give me a hint on which sources i would have to download how i would need to throw everything together? Thx so much in advance and cheers all!

Download the example template locked branch from 4.20, generally later engine versions of the plugin are not compatible with earlier engine versions due to how much changes in engine between versions. I back port fixes to earlier source builds when I can directly do so though.

https://bitbucket.org//vrexppluginexample/downloads/?tab=branches

Has the current branches listed for the example template, the template comes with the plugin source as well.