VR Expansion Plugin

Yeah I will think it over some more and spend some time with the wiki.

Just to check, is the current Master Branch to be used with UE 4.15?

Yes, master branch is 4.15 only as of last night

Thanks for the info. I just tested out the VR Simple Character Actor, should it have controllers and be able to teleport?

I’m finding it much easier to modify the template to my requirements.

Just did a final patch today to fix a bug with the RIP and armswing velocity function.

Its probably a problem with my setup but posting just in case someone knows the problem.
Hands are separate actors in my game that are grabbed with plugin. If a dual gripped weapon is attached in one hand I add a secondary attach point to root (invisible box collision) of the other hand.
works with the first hand that dual grips the other hand but when I grab the same weapon with the other hand and try to dual grip, the grabbed actor lags behind with movement.

Hello trying to compile the example project. I had done successfully before but after much experimentation i managed to break the entire level so decided to download the level again. However, the engine wont build it like it did last time and when i still to build it inside of VS i get
"
1>------ Rebuild All started: Project: VRExpPluginExample, Configuration: Development_Editor x64 ------
1> Cleaning VRExpPluginExampleEditor Binaries…
1> Compiling game modules for hot reload
1> Creating makefile for hot reloading VRExpPluginExampleEditor (no existing makefile)
1> Compiling game modules for hot reload
1> Performing full C++ include scan (no include cache file)
1> Parsing headers for VRExpPluginExampleEditor
1> Running UnrealHeaderTool “C:\Users\Downloads-vrexppluginexample-b24d9b1b09fd-vrexppluginexample-b24d9b1b09fd\VRExpPluginExample.uproject” “C:\Users\Downloads-vrexppluginexample-b24d9b1b09fd-vrexppluginexample-b24d9b1b09fd\Intermediate\Build\Win64\VRExpPluginExampleEditor\Development\VRExpPluginExampleEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
1> Reflection code generated for VRExpPluginExampleEditor in 20.5315337 seconds
1> Performing 16 actions (9 in parallel)
1> [6/16] Resource PCLaunch.rc
1> [9/16] Resource ModuleVersionResource.rc.inl
1> [7/16] Resource ModuleVersionResource.rc.inl
1> [8/16] Resource PCLaunch.rc
1> AdvancedSessions.generated.cpp
1> Module.VRExpansionPlugin.cpp
1> Module.AdvancedSessions.cpp
1> VRExpansionPlugin.generated.cpp
1> PCH.VRExpPluginExample.h.cpp
1> [10/16] Resource PCLaunch.rc
1> [11/16] Resource ModuleVersionResource.rc.inl
1> VRExpPluginExample.cpp
1> EmptyClassForProject.cpp
1>C:\Users\Downloads-vrexppluginexample-b24d9b1b09fd-vrexppluginexample-b24d9b1b09fd\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Public\VRExpansionFunctionLibrary.h(19): fatal error C1083: Cannot open include file: ‘SteamVRPrivate.h’: No such file or directory
1>C:\Users\Downloads-vrexppluginexample-b24d9b1b09fd-vrexppluginexample-b24d9b1b09fd\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Public\VRExpansionFunctionLibrary.h(19): fatal error C1083: Cannot open include file: ‘SteamVRPrivate.h’: No such file or directory
1> [14/16] Link UE4Editor-AdvancedSessions-2395.dll
1> Creating library C:\Users\Downloads-vrexppluginexample-b24d9b1b09fd-vrexppluginexample-b24d9b1b09fd\Plugins\AdvancedSessions\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AdvancedSessions-2395.lib and object C:\Users\Downloads-vrexppluginexample-b24d9b1b09fd-vrexppluginexample-b24d9b1b09fd\Plugins\AdvancedSessions\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AdvancedSessions-2395.exp
1>ERROR : UBT error : Failed to produce item: C:\Users\Downloads-vrexppluginexample-b24d9b1b09fd-vrexppluginexample-b24d9b1b09fd\Plugins\VRExpansionPlugin\Binaries\Win64\UE4Editor-VRExpansionPlugin-230.dll
1> Total build time: 260.50 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command ““C:\Program Files (x86)\Epic Games\4.14\Engine\Build\BatchFiles\Rebuild.bat” VRExpPluginExampleEditor Win64 Development “C:\Users\Downloads-vrexppluginexample-b24d9b1b09fd-vrexppluginexample-b24d9b1b09fd\VRExpPluginExample.uproject” -waitmutex” exited with code -1.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

I have tried multiple downloads in different location just can’t get the ****** to work.
Please help :slight_smile:

Th

Looks like you might be passing in the wrong component to follow with the second grip? If you try the example rifle in the template it doesn’t have that issue. That or you aren’t clearing one of the grips. I would have it follow the actual motion controller though, not the hand mesh. Due to how the secondary grip works I have an extra check for if it is following a motion controller, if it is then it directly puills the very latest controller location for the double grip calculation. prevents tick ordering from making the double grip a frame behind and makes it smoother.

You are using the 4.15 version with 4.14, you need to use the 4.14 version, Epic changes how the header files work so the 4.15 won’t cross compile. When you go to the downloads, select “branches” at the top and download thew 4.14 locked branch. However the plugin got significant improvements for 4.15.

VRExpansion plugin + template requests

Hey again ! Was chatting to you on YouTube earlier on.
Just wanted to post a couple of feature requests for your consideration.

1st one was with the template organisation. link should link to post #422 in thread:
Template Folder Structure
I think it would benefit a lot of users and allow migrating the template to be an easy task.

2nd one - some Chaperone Components. should open #421:
Chaperone Components
Would love to see some functionality like described in post #421 being available in the plugin or if other users of plugin have any similar requests.
Your comments on were that you wanted to give access to the ‘hardbounds’, not the 4 point ‘safe bounds’. I think either would be awesome, even just safe bounds would be great and offer easier/quicker functionality than what unreal currently exposes to blueprints - just the 4 vectors of the ‘safe bounds’.
You also flagged that would only support SteamVR not the Oculus SDK. I think that is totally fine.

Also, is a quote from Post #419

Is still on your Trello to explore at some point? I think people would love to see it!

Thanks again for the awesome template!

Thanks! I set the controller component as secondary point and it works great now!

Yeah that folder things is needed, i’ll do that monday. The chaparone system I’ll looks into, even more so since the default ones tend to break in packaged builds.

Pushed a new commit to the template, I intended to get more done weekend, but good weather got in the way :stuck_out_tongue:



RIP motion now uses average of all three tracked components to attain velocity average. (allows for head movement when not jogging with button still pressed down).
Minimum velocity for motion variable set for RIP motion.


Hi Mordental, I couldnt figure it out how to control camera fov,

I tried inside Vive Pawn Character, where you toggle laser beams with shoulder button, I tried with tying up node “set fied of view” but it doesnt work. I need it for sniper rifle’s zoom in option.

How can I solve problem?

You don’t set field of view for a sniper in VR, field of view is locked for HMD’s. You are supposed to render to a texture on your scope instead and let them actually look down the sight.

Ah you mean like in mirror example, put a texture on a scope… Thank you its better approach. I will try.

im using your plugin as a base to create my own interactions. Without it I would be lost. Will your plugin become native to UE4? I mean will it become the standard vr template / components?

No it won’t, for multiple reasons.

Pushed a new commit to the template/ plugin




**Template**
RIP motion now uses all three tracked objects for velocity smoothing, a few exposed variables control how much smoothing is applied. 
 prevents random head motion from causing forward movement when holding the move button.

Re-organized the templates folders to place all ExpansionTemplate content under one master folder.

Now using the new NonAuthorityMinimumAreaRectangle) node from the ExpansionLibrary in the teleport controllers to fix room bounds in multiplayer.

**Plugin**

FBPGripInteractionSettings struct now manually NetSerializes the bitfield booleans as a packed byte, saving 7 bytes on replication.
(I do not NetQuantitize the FVectors and FRotators in  struct as there may be a case where someone wants the full precision for these).

Grippable actors / components still do not default to replicating  structure, as in some cases it is useful to have it client sided.

Added a wall sliding scaler variable the the VRBaseMovementComponent, it multiples the wall sliding effect by  float scaler when colliding with geometry.
In VR it is significantly more dissociating to have the back and forth seesaw slide that the default movement component creates when impacting directly into a wall.
Should  variable prove to not be good enough I may just re-write the slide function entirely, but so far it feels a lot better with values of 0.5 - 0.1.

Added a non server authority MinimumAreaRectangle (NonAuthorityMinimumAreaRectangle) node to the ExpansionLibrary. I can't think of why  is a server sided
node on Epics end but its useful for their teleport system and breaks it in multiplayer otherwise.



Pushed a new commit to the template


Added a retriggerable delay prior to setting up the widget interaction components.
 checks the player state for validity and only once it returns valid does it continue on and
set up the interaction.

Since player state takes a while to replicate to the client if you call that function right away
it could be invalid and never set up the correct variables for the player ID on the interaction component.