Download

VR Expansion Plugin

That is a current engine bug in 4.16, debug draw objects are rendered double when instanced stereo is turned on.

I reported it in a preview build and its on the bug tracker, should be fixed in 4.16.1 I would assume. If you set the collision sphere to “Hidden” they won’t do that anymore, I just like them visible for testing.

Edit In other news am also cleaning up the teleporting a bit more tonight.

Do you have a donation page set up for this project? I appreciate all your hard work and would like to give you something at least since I can’t buy you a beer :slight_smile:

After a few dozen requests I linked one in my sessions plugin page, if enough bring it up in here eventually i’ll do the same here.

But generally i’m trying to help people out.

Nice to see you got it working by the way, I understand it isn’t as easy as a marketplace plugin but the file sizes are an issue and being a bit more advanced than most its probably better for it to have a “little” barrier to entry.

I was wondering how did you attach the controllers with the objects with the correct orientation (i.e The gun snaps into your hand correctly). I’ve been trying to pick up a ball the same way all the time but can’t figure that out.

Also the when I walk close to objects I drop in your template, the entire screen moves away from me, I’m assuming this is because of the collision. This creates a weird feeling, any way to disable that?

Also, when I add assets ( a room with items) my motion controllers start to shake and lose fidelity. Does this mean that there are too many assets or performance issues. I have very few items in my scene, but when I teleport inside the structures the controllers lag and shake and lose tracking. If away from my imported structures, everything runs fine.

Grabbing an object with specific socket setup for a given object let’s you manipulate the transform of a grabbed object.

In order to not be affected by the environment collsion just change the collision responses on the object to ignore pawn (I think the pawn has separate collision type), obviously leaving the floor to block the pawn so you won’t fall down through the floor.

Yeah if you NEVER want collision then change the pawn collision settings, if you want collision only when moving with say, dpad sliding, then you use bWalkingCollision override and set a custom collision channel for roomscale walking. Walking close to objects that you drop shouldn’t be causing it unless you have them on the static geometry collision channel, I default all channels except for that one to off for the pawn. Generally grippable objects should be on the WorldDynamic or PhysicsBody channels.

For the correct orientation, I have a socket added to the mesh with the prefix VRGripP for VRPrimaryGrip and then the number 1 (unique ID), the grippable objects by default check for sockets with this naming prefix convention and pass it out to the player when gripping if one is found (and within the grip snapping distance set on the object, SecondarySlotRange / PrimarySlotRange).

VRGripS is the prefix for secondary snap point for multiple hands. The prefixes can be manually overridden in the objects but generally the defaults should work.

If you look at SK_FPGun in the meshes you can see the names, locations, and rotations of the sockets that I added to it, you should generally be able to just add a socket named VRGripP to your object and it should just work, you may have to set the snap range to the same size as your objects bounds to ensure its always a snapped grip though.

If your controllers are “ghosting/blurring” then yeah, generally that means that you dropped below the 90FPS target, you are using objects too performance heavy for VR or your graphics hardware is weak. You’ll want to look into optimizing the assets for VR.

Pushed new commit to the plugin, been wanting to overhaul the socket logic a bit for awhile now, and adding in scaling grips with physics objects required it for the gun.


Added GetVRDevice_Matrix34Property function to the OpenVR Library, returns them as FTransforms.


Changed GetClosestSlotInRange to check for snap range off of relative location for the snap distance
instead of worldspace. This way snapping ranges should be object relative regardless of scale.

GetClosestSlotInRange is now returning a worldtransform with an identity scale instead of the default
which contains the actor scale. This way when made relative to the object the transform will
be correct regardless of scaling.

Physics simulating objects now are manually scaled if Scaling_Retain secondary grip type
is defined in their VRGripInterface, this brings them to par with non simulating objects.
Since simulating objects are not directly moved, but rather constrained to a kinematic object
it was nessecary to manually rescale them seperately if the grip called for it. Current implementation
may be streamlined in the future.

**TEMPLATE BUT RELEVANT**
Template Gun logic for snap point location check modified to support the fact that if
scaled now it will have a modified relative location. (Need to consider whether to support
direct grip storage of slotted grip or to continue leaving it up to users). Original logic
will continue to function for 1:1 scaled objects, but up/downscaled objects would need to
adjust.

If I add direct support for "was slot" I would have to add the name of the slot as well for identification.

I don't really want to bloat the grip structures or interface structures any more than they already are.

Hey mordentral!
thanks for this, is helping a lot!

One question…
If i need to calibrate vr for different heigth players, and it is multiplayer, so i cant change word using “set world to meters scale”

And i cant create a scene component to add the camera and controllers because they are inhherited…

what is your sugestion to calibrate with out ending with diferrent multiplayer height?

thank in advance

You actually CAN add a client root and manually re-parent the controllers and hmd to it in blueprints, you just call the detach / attach nodes on begin play to set them to the new parent and then it should function as you want.

I don’t provide a native form for this, as generally its intended that players be different heights and client side height disassociation may be a bit off putting during game play, even more so considering arm length would not change.

Hi Mordentral,

Thank you for your great help for the ue4 VR community!

I start experience this amazing project and I wanted to try the multiplayer via steam with a friend of mine.
I sent him the packaged project (Development) I host the server, but he can never found me.
I start digging a bit in the logs and found the following error:
LogOnline:Display: STEAM: Loading Steam SDK 1.32
LogOnline:Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
LogOnline:Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline:Warning: STEAM: Steam API failed to initialize!
LogOnline:Display: STEAM: OnlineSubsystemSteam::Shutdown()

I assume this is the reason why its not working…
I tried looking for more information online but don`t see anything useful.

P.S - we were able to connect vie open level?listen and open ip, so I don`t think its a network issue unless steam required specific port.

Thanks in advance

Are you running steam and is the editor closed when you run the binary?

Also you can try downloading the packaged demo in the OP and seeing if steam connects for you with that.

Hey @mordentral I asked a question about including FLEX a while back, and it worked great.

Now I was trying to incorporate your plugin into a 4.15.3 engine build that includes FLEX, Hairworks, Flow, and VolumLight …

I’ve followed your steps … included the relevant folders in the Plugins folder of my Engine && My Project/Plugins folder… when I try to build the project.sln I get the following
Errors

Severity Code Description Project File Line Suppression State
Error CS1729 ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 1 arguments FlexProject c:\Users\jjjreisss\UnrealEngine\FlexProject\Plugins\OpenVRExpansionPlugin\Source\OpenVRExpansionPlugin\OpenVRExpansionPlugin.Build.cs 12
Error CS1061 ‘UnrealBuildTool.ReadOnlyTargetRules’ does not contain a definition for ‘Platform’ and no extension method ‘Platform’ accepting a first argument of type ‘UnrealBuildTool.ReadOnlyTargetRules’ could be found (are you missing a using directive or an assembly reference?) FlexProject c:\Users\jjjreisss\UnrealEngine\FlexProject\Plugins\OpenVRExpansionPlugin\Source\OpenVRExpansionPlugin\OpenVRExpansionPlugin.Build.cs 58
Error CS1061 ‘UnrealBuildTool.ReadOnlyTargetRules’ does not contain a definition for ‘Platform’ and no extension method ‘Platform’ accepting a first argument of type ‘UnrealBuildTool.ReadOnlyTargetRules’ could be found (are you missing a using directive or an assembly reference?) FlexProject c:\Users\jjjreisss\UnrealEngine\FlexProject\Plugins\OpenVRExpansionPlugin\Source\OpenVRExpansionPlugin\OpenVRExpansionPlugin.Build.cs 58
Error CS1729 ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 1 arguments FlexProject c:\Users\jjjreisss\UnrealEngine\FlexProject\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\VRExpansionPlugin.Build.cs 12
Error CS1061 ‘UnrealBuildTool.ReadOnlyTargetRules’ does not contain a definition for ‘Platform’ and no extension method ‘Platform’ accepting a first argument of type ‘UnrealBuildTool.ReadOnlyTargetRules’ could be found (are you missing a using directive or an assembly reference?) FlexProject c:\Users\jjjreisss\UnrealEngine\FlexProject\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\VRExpansionPlugin.Build.cs 111
Error CS1061 ‘UnrealBuildTool.ReadOnlyTargetRules’ does not contain a definition for ‘Platform’ and no extension method ‘Platform’ accepting a first argument of type ‘UnrealBuildTool.ReadOnlyTargetRules’ could be found (are you missing a using directive or an assembly reference?) FlexProject c:\Users\jjjreisss\UnrealEngine\FlexProject\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\VRExpansionPlugin.Build.cs 112
Error CS1061 ‘UnrealBuildTool.ReadOnlyTargetRules’ does not contain a definition for ‘Platform’ and no extension method ‘Platform’ accepting a first argument of type ‘UnrealBuildTool.ReadOnlyTargetRules’ could be found (are you missing a using directive or an assembly reference?) FlexProject c:\Users\jjjreisss\UnrealEngine\FlexProject\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\VRExpansionPlugin.Build.cs 113
Error CS1061 ‘UnrealBuildTool.ReadOnlyTargetRules’ does not contain a definition for ‘Platform’ and no extension method ‘Platform’ accepting a first argument of type ‘UnrealBuildTool.ReadOnlyTargetRules’ could be found (are you missing a using directive or an assembly reference?) FlexProject c:\Users\jjjreisss\UnrealEngine\FlexProject\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\VRExpansionPlugin.Build.cs 114
Error UnrealBuildTool encountered an error while compiling source files FlexProject C:\Users\jjjreisss\UnrealEngine\FlexProject\Intermediate\ProjectFiles\EXEC 1
Error MSB3075 The command “C:\Users\jjjreisss\UnrealEngine\Engine\Build\BatchFiles\Build.bat FlexProjectEditor Win64 Development “C:\Users\jjjreisss\UnrealEngine\FlexProject\FlexProject.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command. FlexProject C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 41

*[SIZE=2]Hello again.
I got the plugin downloaded to UE4.16.1 and so far it looks great. One issue though,

When using the VRSimpleCharacter I attached controller meshes to the inherited Left and Right Motion Cotrollers, but they seem to be dragging on the ground and not responding to my physical motion controllers.

Did I skip a step?*[/SIZE]

EDIT: I hate to be that guy, but I restarted my PC and now its working great.

You are using the 4.16 source branch with a 4.15 version of the engine (though modified it is still 4.15). Epic changed how module rules are declared in 4.16 so its not directly compatible.

You can download the locked 4.15 branch instead and use that.

Hi!

I have a problem. I don’t know if is a VRExpansionPlugin, AdvancedSessions, Unreal problem or all.

I’m testing my project with VR and Advanced Sessions in my multiplayer project, and i can’t connect with other clients in VR Preview or Shipping Build (with steam_appid.txt and set in 480 ).

I’m be very frustrated, In Normal Preview, Standalone and New Window, works perfectly. Find, Create. But in VR Find, always return On Failure. In LAN and not LAN.

Why?

I’m testing in VRExampleProject, and same issue, don’t find nothing. In Lan and not LAN. I package the project in shipping and append the steam appid and same issue. In VR sessions don’t working.

Version 4.16.1.

One suggestion?

VR Preview steam won’t work with, and in shipping builds the appid.txt needs to be in the EXE folder, many people place it in the incorrect location.

You could always go to Saved/Logs and post the log as well, but I am assuming that the steam subsystem is actually not loading for you. Do you get the steam overlay active on your project?

I’ll note I did just fix a broken boolean that was preventing the widgets from being released on the hosting menu. It was disconnected during my blueprint overhaul of the template.

Hi,

IHow can I use the template or plugin in my Projects…Is there any tutorials or videos explains how this thing works !!! Thanks.

Hi Mordentral, thanks for you Reply.

I put de steam_appid.txt with only 480 inside. But when i launch the Shipping versión of your VRExpPluginExample, steam Overlay not appear in VR, well, this open, but VR Overlay not show i’m in Spacewars…
This only ocurs in VR, in preview, new window and standalone works perfectly. Find, Join, Create, Overlay… But in VR nothing works… In Shipping too…

I only open your project, build in x64 in shipping method. Put steam_appid.txt in root folder. This pic to ilustrate:

error.jpg

I can’t understand why Unreal not solved this, is impossible develop a multiplayer game in the proper way if you wait 15 minutes to package a game every time that you want to test something.
I’m suppose why the Engine can’t manage two subsystem in same time, and when it manage VR Subsystem Steam, can’t run the Online Subsystem Steam.

But now at least i want to run the game in Package Shipping. But i don’t sure if this works, i’m supposed yes. You have the Host, Join and find in the VRExpansionExample but i can’t handle it works.

Where is the log in the package shipping?

Regards!

Logs are in “Saved”, also that isn’t the correct App_ID.txt location, it should be in GameName/Binaries/Build where the actual EXE is.

Pushed a new commit to the Plugin Template



Added new prelim procedural VR keyboard

Fixed a bug with the widget interaction components not releasing that was introduced with the BP overhaul.

Moved more of the input mappings into the Inputconfig and out of being directly declared in the character.


I know that I had said that VR keyboards were not plugin related and were better left to the marketplace, however I kind of wanted one for my console object and I had the idea of driving one off of a datatable
so that the layout and content is fully dynamic. It should allow for both 2D and 3D keyboards to be generated off of the same datatable with multiple layouts and localization. So far only a prelim 2D version is
implemented as I just started in on it today, the early 2D version is detailed in the video below.

It may change / be cleaner later on, being a 1 day effort there are likely iterative changes that I will make to it in the future as well as the 3D version.

https://www.youtube.com/watch?v=Bq-xPGF3MwE