VR Expansion Plugin

VR character comes with the motion controllers as children to the pawn already, if you make a blueprint with it as the parent then you can start controlling it and seeing the components more easily.

If you were to make a custom pawn then you would have to add GripMotionControllers yourself.

The VRCharacter is kind of meant to be an all in one pre-made of the various components (plus some features like navigation require it as it overrides some functions in base character).

I must have missed something then. The blueprint is a child of the c++ VRCharacter but the motion controllers aren’t visible.

The steps I took were;

  1. Downloaded 4.13 Re-Write commit 0bd77d0
  2. New Blueprint Project “Virtual Reality” template.
  3. Created “Plugins” directory and copied files across.
  4. Added new C++ class “MyVRCharacter” from Parent Class VRCharacter. Initial compile within UE4 was unsuccessful due to being unable to overwrite binaries so I deleted the binaries and re-compiled in Visual Studio.
  5. Created a blueprint child from MyVRCharacter.
  6. Created a blank level and added MyVRCharacter. The only property of MyVRCharacter I changed was “Auto Possess Player: Player 0”.
  7. Play in VRPreview. HMD tracking normal but motion controllers aren’t visible.

Oh, you need to attach something to them. They don’t have meshes, they are just the component themselves, what they look like is up to the user.

You can also pull the players SteamVR Controllers in with the SteamVRLibraryFunctions component and a procedural mesh component attached to the controllers, but since that is more complicated and you just want to test for now, just attach some spheres to the GripMotionControllers.

Doh! Got it. Thanks for the quick response.

Just pushed a new commit



**09/28/2016**- 4.13 migration update

Locked previous plugin to 4.12 locked branch so that 4.10-4.12.5 builds would have a stable version.

Re-wrote navigation for 4.13 specifically, removed legacy 4.12 compatible code

Removed all supporting code for past engine versions

Changed how parent relative component calculates its Yaw to remove a slight offset that was triggering my OCD.

Renamed Default branch to Master, is now 4.13 compatible only.


Hi is there any way you could compile a version with the 4.12 oculus forward renderer
https://github.com/Oculus-VR/UnrealEngine/tree/4.12-ofr

If you are using the oculus forward renderer already than you can just compile it yourself, the locked 4.12 branch should be compatible with it as 4.11 was still compatible with that version last I checked (in case its missing commits). I have a version on the NVIDIA multires 4.12 branch that is working just fine as well as one on the NVIDIA VR GameWorks 4.12 Branch.

You’ll need a source file in your project to package anyway as it isn’t an Engine plugin.

No it doesn’t compile I’m afraid I think its because it uses the 4.12.4 branch of UE. It starts out saying its building then after about five minutes it gives an error message.

Whats the error message?

It asks if I want to rebuild as normal.

Wouldyouliketobuild.JPG

Then it starts the build.

StartBuild.JPG

Then after about 5 minutes it gives error.

Couldnotbecompiled.JPG

Oh, you have to do what it asks, open up a project file (solution file, SLN) and build the project. It can’t always build plugins correctly from the auto build during launch. Mostly when switching engine versions entirely.

I’m sorry what do you mean open up the project file? If you mean double click (open) the uproject file then that’s what I’m doing.

Edit: Ahh hang on you mean open up the visual studio file. What do I do from there though? Just click build f5?

It just gives the same error when I try to rebuild from the sln file.

Right click on your project name on the right window and left click on build or click on build in the menu and build your project name (not the entire engine). You can build F5 but it will launch from the IDE then, and you don’t need to do that, once it is built you can open it like normal from the UPROJECT.

Edit If it didn’t pick up on the plugin then click on REBUILD instead.

Hi its just not working. I tried build and when I tried to start the uproject it asked to build and failed to build. The same thing happened with rebuild (which took much longer) tried to build again when I clicked on uproject.

Make sure that the plugin files aren’t set to read only and post the output log from the bottom after building. It shouldn’t be having an issue.

Hi is the output log. There were five errors. is for a rebuild.

Severity Code Description Project File Line Suppression State
Error C2664 ‘void DrawDebugDirectionalArrow(const UWorld *,const FVector &,const FVector &,
float,const FColor &,bool,float,ESceneDepthPriorityGroup,float)’: cannot convert argument 8 from ‘uint8’
to ‘ESceneDepthPriorityGroup’ Game
C:\Users\User\Documents\Unreal Projects\Game\Plugins\VRExpansionPlugin-vrexpansionplugin-54a99117fb86\Source\VRExpansionPlugin\Private\VRCharacterMovementComponent.cpp
1836

Severity Code Description Project File Line Suppression State
Error C2664 ‘void DrawDebugDirectionalArrow(const UWorld *,const FVector &,const FVector
&,float,const FColor &,bool,float,ESceneDepthPriorityGroup,float)’: cannot convert argument 8 from ‘uint8’ to ‘ESceneDepthPriorityGroup’
Game C:\Users\User\Documents\Unreal Projects\Game\Plugins\VRExpansionPlugin-vrexpansionplugin-54a99117fb86\Source\VRExpansionPlugin\Private\VRCharacterMovementComponent.cpp
1852

Severity Code Description Project File Line Suppression State
Error C2664 ‘void DrawDebugDirectionalArrow(const UWorld *,const FVector &,const FVector
&,float,const FColor &,bool,float,ESceneDepthPriorityGroup,float)’: cannot convert argument 8
from ‘uint8’ to ‘ESceneDepthPriorityGroup’ Game
C:\Users\User\Documents\Unreal Projects\Game\Plugins\VRExpansionPlugin-vrexpansionplugin-54a99117fb86\Source\VRExpansionPlugin\Private\VRCharacterMovementComponent.cpp 1878

Severity Code Description Project File Line Suppression State
Error Failed to produce item:
C:\Users\User\Documents\Unreal Projects\Game\Plugins\VRExpansionPlugin-vrexpansionplugin-54a99117fb86\Binaries\Win64\UE4Editor-VRExpansionPlugin.dll Game
C:\Users\User\Documents\Unreal Projects\Game\Intermediate\ProjectFiles\ERROR 1

Severity Code Description Project File Line Suppression State
Error MSB3073 The command
“C:\OculusForwardRenderer4.12\UnrealEngine-4.12-ofr\Engine\Build\BatchFiles\Rebuild.bat GameEditor Win64 Development
“C:\Users\User\Documents\Unreal Projects\Game\Game.uproject” -waitmutex” exited with code -1. Game
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 42

Ah, Oculus changed the debug draw functions for their branch. Ok well that is a simple fix, i’ll remove those from the 4.12 locked version, the visualize movement function is pretty unusable in VR anyway.

Edit Removed them, re-download the 4.12 locked branch and you should be good to go.

I did get the same error when I tried to build from the uproject so I’m trying a rebuild now from the sin file. is the download link to the updated file ya? https://bitbucket.org//vrexpansionplugin/downloads

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

Download the 4.12 locked branch