VR Expansion Plugin

Its mainly intended to be used in blueprint, I put a lot of effort into exposing everything for it. However it does require learning how to press some buttons in the right order to compile it, there is a guide for that (unless you use the pre-compiled which will always be a bit behind updates).

The template project is all blueprint as I figured that c++ users could translate things back to c++ but the other way around is harder.

Pushed a new commit to the plugin (4.18 has major changes but not going to list them until it releases, is for 4.17)


 
 Fixes an issue with the new late update method in 4.18 that I early updated to.   
 Since it is queuing the late update now to avoid thread racing in game and render,  
 it applies the final late update one frame later in render thread  
 after the object is no longer late updated so if you don't move or update the  
 component (or its parent) after releasing it then it never  
 loses the rendering offset.    
 I am just calling UpdateComponentToWorld now on release to correct for it.  

Hi!

I got the plugin working on my blueprint project. I’m however having problems with the template. Seems that Unreal doesn’t find the Advanced Sessions plugin and thus I get all kind of errors.

Steps I took:

  1. Download the 4.17.2 plugin versions of both Advanced Sessions and VRExpansion plugins and add them to the Plugins folder (I first tried without replacing the ones already there)
  2. Delete intermediate folder
  3. Change engine version and / or generate visual studio files
  4. Open and build solution in visual studio
  5. Run UE project

Any ideas?

Thanks!

I’m trying to remake a character without using the template. I noticed there’s function Get MotionControllerThumbleft/right_X/Y function.

I can’t find it when I try to add a new one to a different, non-template, project (can’t even add a new one in the template character without copy-pasting it). Anyone know how to add it?

Edit: Sorry, found it. Had to search for Left/Right_X/Y. And, it’s an input. Never noticed that getting inputs was a function. Sorry!

Hi, !

Firstly, you’ve made realy great work! I’ve downloaded the plugin for physical grip, but found many interesting things in it.
Unfortunately, I occured a bug that crashes the editor (2017-10-10 commit). I’m not sure about what causes the crash, but it always crashes when I use OnChildGripRelease on specific blueprint. Also I’ve detached my bp code from release event to be on the safe side, but it didn’t help.
Output: [SPOILER]


Assertion failed: NewMass > 0.f [File:D:\Build\++UE4+Release-4.17+Compile\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodyInstance.cpp] [Line: 3685]

KERNELBASE
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::DestroyPhysicsHandle() [_\vrexpansionplugin\vrexpansionplugin\source\vrexpansionplugin\private\gripmotioncontrollercomponent.cpp:2982]
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::Drop_Implementation() [_\vrexpansionplugin\vrexpansionplugin\source\vrexpansionplugin\private\gripmotioncontrollercomponent.cpp:1443]
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::NotifyDrop_Implementation() [_\vrexpansionplugin\vrexpansionplugin\source\vrexpansionplugin\private\gripmotioncontrollercomponent.cpp:1434]
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::execNotifyDrop() [_\vrexpansionplugin\vrexpansionplugin\source\vrexpansionplugin\public\gripmotioncontrollercomponent.h:86]
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::NotifyDrop()
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::DropGrip() [_\vrexpansionplugin\vrexpansionplugin\source\vrexpansionplugin\private\gripmotioncontrollercomponent.cpp:1268]
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::DropComponent() [_\vrexpansionplugin\vrexpansionplugin\source\vrexpansionplugin\private\gripmotioncontrollercomponent.cpp:1187]
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::DropObjectByInterface() [_\vrexpansionplugin\vrexpansionplugin\source\vrexpansionplugin\private\gripmotioncontrollercomponent.cpp:782]
UE4Editor_VRExpansionPlugin!UGripMotionControllerComponent::execDropObjectByInterface() [_\vrexpansionplugin\vrexpansionplugin\source\vrexpansionplugin\public\gripmotioncontrollercomponent.h:86] //<-gripmotioncontroller destructor
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

[/SPOILER]

Blueprint VRGripInterface is: [SPOILER] Drawer.PNG [/SPOILER]

Since you are adding them to your own project you may need to enable the Advanced sessions plugin in the plugins list.

Also if you aren’t planning on using advanced sessions you can delete the server info and 3D Menu blueprints and just not have the plugin at all, it is only used to handle that server browser widget in the template level.

Anything I need to set for the HMD to get tracked after building the plugin for a blank or Epic VR project?

As mentioned previously () I tried to create a non-template VR character, and I got problem where the HMD and MCs aren’t getting tracked.

(Used the zip file in the ss below;cl c8cdf1e)

I verified the HMD is getting tracked with a template project, but fsr it isn’t getting tracked in a non-template one. The VRchar is immobile. I can see my hands right out in front of me, but I’m stuck at the position of the Player Start.

I tried to debug it, and it looks like the HMD isn’t getting recognized as being on in the Player controller.

Shouldn’t need to do anything, the camera locks to HMD by default. Unless you turned off the VR plugin or are trying to run two editor instances at once it should work when stereo is enabled/turned on (you may have forgotten step?).

What is the difference between the regular Vive character and the Simple Vive character? Which one should I use?

I wasn’t adding the Advanced Session plugin to my own project. That project I got working well with only the VRExpansion. It was just the template project that was problematic. Good to know about the server info and 3D Menu, thanks!

New, unrelated question:
I now have LAN multiplayer working in my own blueprint project and I’m using the VR Simple Character as the basis for my pawn. The head and hands replicate smoothly on both server and client. However, when the client side tries to move his head, the world starts moving very glitchily/ weirdly for him. happens on only moving and NOT when rotating the head (rotating the head and motion controllers are smooth). It kind of feels like the server is feeding back and setting the HMD’s location to the client. Why could be?

Hi,

I’m trying to make small mini game where you throw a ball between players, I made a grippable static mesh with the default grip interface settings, but when I throw the ball, there’s a frame where the ball continues to be attached to my hand before it receives the update from the server that sets it to the correct position. I’m using the template character.

What is the best way to have remove “jitter”/desynced frame before the server updates?

Thank you

Regular vr character is more involved and custom, the simple one is an easier / safer fallback in case something terribly breaks about how I do the main character at some point.

I tend to promote the main character now that it has been fine tuned, and most of my testing is through it so sometimes SimpleCharacter bugs last a little longer than on the main character.

I’ll need to test again, the simple character isn’t really intended for multiplayer like the main character is and it may have fallen back on somewhere during my networking performance overhauls.

I probably missed a variable when changing everything recently, i’ll look into it.

You can run the grip on the ball with a full client side authority grip (doesn’t wait on server verification) will grip and release immediately. If the ball replicates its position though you can still get a correction from the server side when it starts replicting position after it gets the drop notice…

IE: Client releases, sees it fly away, server gets notified PINGTIME later, server drops with velocity and starts replicating position, client gets updated to the location PINGTIME x 2 ago.

The solution to that is full physics prediction and replication…which is not an easy task.

You could also fake it and have a non position replicating ball which can get out of sync depending on the physics sim, you can trend it over time to the servers position to account for that or just completely ignore the fact that it might not be at the same location.

Or server side movement which requires some custom logic to get working correctly since the default engine replication only functions when given a physics velocity for prediction.

Edit Easiest method might be to hide it until the server updates so you don’t get the warp after it is thrown.

Fixed…I had a Z in the place of an X…go figure.

I’ll add simple character to my unit tests for multiplayer in the future.

Thanks for the quick reply! I’ll change it to the main character in that case.

Don’t miss that it is fixed already though :p. The simple character just lacks a few features that the advanced one provides, but is easier to understand for the user and upkeep for me ( is the second bug reported on it since it was made even though I have overhauled the main character multiple times and changed the base character backend a ton).

I probably mis-stated there, it is multiplayer capable, but I run most of my iteration on the main character, since the simple char is so stable it gets less testing.

Also as you saw, walking around when the server is correcting your position can roll back your actual location, which is why I feel the advanced character is better suited to multiplayer.

With the advanced character you won’t get positional rollbacks from walking, only locomotion or collision with things, so in high packet loss situations it won’t induce as much nausea.

That was the step. Never knew such a setting (Instanced Stereo, in Project Settings) existed. Thanks a lot!

Edit: Scratch that. Didn’t work. After enabling Instanced Stereo and restarting, seems SteamVR’s saying UE4Editor isn’t responding. Restarted again, making sure no other instances were running. That previous error went away, but the Camera/HMD is still stuck at the bottom of the capsule.

The ss shows what it looks like when the controllers are off. Turning 'em on, they disappear - probably are moving to their proper position relative to the capsule. (I’m working in a really confined space where the ground is out of sight of the sensors, so I can’t verify if they’re getting tracked).

I’ve verified the proper character is spawning at least.

Meant the EnableHMD or stereo on console command.

Thanks a lot for the reply. I don’t recall seeing a step-by-step for the bare minimum requirements of getting a VRcharacter class up and running (I mean, just have it take control of the HMD and MCs).

Downloaded the default template 34f41b9built it and tried to run it, but even then I’m getting the 2d character by default (can move around WASD style and jump, but that’s it). I’m running 4.17.2 and I haven’t updated SteamVR in a little over a month. Could that be a problem?

Btw, I tried sticking that “EnableHMD” console command on begin play in the level blueprint of the template, but the HMD still isn’t getting recognized.
I’ll see if I there’s a SteamVR update.

If you are running VRPreview its automatically called anyway in editor. But if you are running VR preview the HMD is already detected regardless.

I don’t know what you are having as an issue here, but it is unrelated to the plugin, I don’t control or handle the VR engine plugins.