VR Expansion Plugin

Thanks for the work you have put in!; I’ve migrated a VRPawn to your collision character. I’m having issues with the Vive_PawnCharacter not working with Ikinema though… The log files is saying ‘Failed to get tracked ID Device’. It has worked intermittantly, but then stopped immediately afterwards. The weird thing is, controllers are tracking and working perfectly, even the grip animations and room-scale wlaking animations work, only arms aren’t being followed.


[2017.01.16-13.02.47:946][825]LogGameState: Match State Changed from WaitingToStart to InProgress
[2017.01.16-13.02.47:969][825]PIE: Info Play in editor start time for /Game/VirtualRealityBP/Maps/UEDPIE_0_MotionControllerMap 0.288
[2017.01.16-13.02.47:969][825]LogBlueprintUserMessages: Late PlayInEditor Detection: Level '/Game/VirtualRealityBP/Maps/MotionControllerMap.MotionControllerMap:PersistentLevel' has LevelScriptBlueprint '/Game/VirtualRealityBP/Maps/MotionControllerMap.MotionControllerMap:PersistentLevel.MotionControllerMap' with GeneratedClass '/Game/VirtualRealityBP/Maps/MotionControllerMap.MotionControllerMap_C' with ClassGeneratedBy '/Game/VirtualRealityBP/Maps/MotionControllerMap.MotionControllerMap:PersistentLevel.MotionControllerMap'
[2017.01.16-13.02.48:026][826]LogRenderer: Reallocating scene render targets to support 3240x1800 NumSamples 1 (Frame:3962).
[2017.01.16-13.02.48:027][826]VRExpansionFunctionLibraryLog:Warning: Couldn't Get Tracked Devices!!
[2017.01.16-13.02.55:527][498]LogBlueprintUserMessages: [Vive_PawnCharacter_1010]

So my plugin library can’t find the tracked devices, you must be on oculus plugin right and not steamvr? The VRExpansionFunctionLibrary functions for getting the device models only works with Open/SteamVR since it is their function.

Nah shouldn’t be, using etc vive and all the normal settings lol.

Hey there Modentral.

Packaging my game for testing and I get a couple hundred of these errors:

UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: PCH.VRExpPluginExample.h.cpp
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: Module.VRExpansionPlugin.cpp
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: E:\game\DatedBackups\1.16.17\Plugins\VRExpansionPlugin\Intermediate\Build\Win64\UE4\Inc\VRExpansionPlugin\VRBPDatatypes.generated.h(14): error C2007: #define syntax

Know anything about that?

The folder 1.16.17 will throw that I believe, see UE4 answerhub issue: Why can i not compile anymore in 4.9.2 - Programming & Scripting - Epic Developer Community Forums
and why they explain not to use file paths that begin with a numeric value. Adding an underscore before the date would probably work.

The bug is being thrown in a “Generated” file which usually means that something went wrong with the unreal build system btw, so looking up the error code and UBT generally arrives at the answer.

I’m receving these errors when packaging for Development x64. I’m not using the VRSimpleCharacterMovementComponent in the project, and I was able to package fine just a day ago. Makes me think the errors are because of something else and not actual errors?


 ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(819): error C2027: use of undefined type 'AVRSimpleCharacter'GetUserPrivilegeCallbackProxy.cpp
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: 
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Public\SimpleChar\VRSimpleCharacterMovementComponent.h(22): note: see declaration of 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(819): error C2227: left of '->VRSceneComponent' must point to class/struct/union/generic type
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(819): error C2227: left of '->SetRelativeLocation' must point to class/struct/union/generic type
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(821): error C2027: use of undefined type 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Public\SimpleChar\VRSimpleCharacterMovementComponent.h(22): note: see declaration of 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(821): error C2227: left of '->GenerateOffsetToWorld' must point to class/struct/union/generic type
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(836): error C2027: use of undefined type 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Public\SimpleChar\VRSimpleCharacterMovementComponent.h(22): note: see declaration of 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(836): error C2227: left of '->VRReplicatedCamera' must point to class/struct/union/generic type
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(1201): error C2027: use of undefined type 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Public\SimpleChar\VRSimpleCharacterMovementComponent.h(22): note: see declaration of 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(1201): error C2227: left of '->VRMovementReference' must point to class/struct/union/generic type
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(1203): error C2027: use of undefined type 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Public\SimpleChar\VRSimpleCharacterMovementComponent.h(22): note: see declaration of 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(1203): error C2227: left of '->VRMovementReference' must point to class/struct/union/generic type
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(1203): error C2227: left of '->AdditionalVRInputVector' must point to class/struct/union/generic type
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(1204): error C2027: use of undefined type 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Public\SimpleChar\VRSimpleCharacterMovementComponent.h(22): note: see declaration of 'AVRSimpleCharacter'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(1204): error C2227: left of '->VRMovementReference' must point to class/struct/union/generic type
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ...\Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\SimpleChar\VRSimpleCharacterMovementComponent.cpp(1204): error C2227: left of '->RequestedVelocity' must point to class/struct/union/generic type

Might want to “clean” and “rebuild” your project, I just ran a package to make sure since that is two in a row packaging issues and it completed without issue.

"
Added in auto deletion of physics handles for pending kill objects,
ensured that grips are removed on pending kill objects."

Great idea, thank you!

Maki-san and i got our build to package successfully but run into a critical failure when launching the .exe. We’ve been able to launch and play it before but for some reason it doesn’t work with our latest build

Here is the past bin:

I’m not sure where these errors are coming from

The errors are missing textures/materials that didn’t package out from your project, the Critical Error (important one) is a bad memory address and could be caused by a ton of things, log doesn’t really help there. I’ve seen it caused from the steamVR plugin before when the room setup is incorrect and it throws a bad matrix for the controllers, however it generally warns of a NAN matrix before that so I doubt that is what caused it.

Could be anything that caused that, if you said it worked fine before then it is likely to be something you recently changed.

Committed new branches to the template and the plugin - 4.15 Alpha

Due to systematic engine header changes and a few other things I will be locking the 4.14 version to its own branch at the last update and then moving the plugin forward with 4.15 and up when it is more stable (out of preview).

Edit Also appears that the nativization of blueprints with plugins interaction has been fixed in 4.15, so finally can package out with that option selected and using a code plugin…really good news for blueprint logic VR applications as it drops that 10x overhead querying the blueprint graph from c++.

Actually has major implications for my plugin as it is now significantly cheaper to check interface properties on the back end.

So are you saying that in 4.14.3, we can’t use Nativize Blueprint Asset option with your plugins?

As far as I am aware you can’t in 4.14 with ANY code plugin that isn’t engine installed, my advanced sessions and voxel plugins also didn’t work with nativize prior to 4.15. Likely due to nativize being in a beta state in prior releases.

But I just did a test with your Advanced Sessions plugin, nothing crazy, just a few nodes and it packaged out fine… That’s why I was wondering what you meant by .

Ah, maybe .3 fixed it then, because I tested sessions on .1 when it first released and it didn’t work and I know for sure that plugin didn’t work on .2.

don’t really care when it happened though, just happy that it did :o

If I want to implement in my game, do I need to create the blueprints for the pawn from scratch and copy what you did? Or is it somehow possible to migrate into my game? I’m rather new to VR but your example has four things that my game desperately needs, (1) collision with walls, (2) the opening doors mechanic, (3) the movement where the player follows the direction of the touch controller, and (4) the ability to pickup objects.

I’ve been trying to recreate the Simple VR Character but as a beginner to Blueprints I’m having a lot of trouble.

Are you available for private tutoring?

FYI, both Advanced Sessions and VR Expansion Plugin compiled fine in 4.14.3 and there was a successful test build (Shipping 64-Bit) on my end. Hopefully wasn’t just a fluke.

My players when they spawn in spawn in as a Simple Vive pawn.

Then when they grab an object and move it, it spawns and possess a pawn.

My problem is that I don’t know how to have it see which player controller (1 or 0) grabbed which object. Could I cast from the object they gripped and get player controller and then cast it to my level BP?

Or is there a more simple way to do ?

EDIT: Also I am LOVING plugin, great features !

When gripped if the object is using the interface it passes in the motion controller gripping it. That motion controllers owner is the character that has it and you can get a player controller from that character.

Also there are helper functions if you would rather just check the players manually to see if they hold it (IsHeld() node on motion controllers).

There are a lot of reasons I chose to encapsulate gripping logic into the controllers and not into base objects like say the VRtoolkit for unity does, it is more efficient, faster to iterate, and allows for devs to use “dumb” objects that don’t tick.

The major downside is that to not enforce base types on people going object->holder is less straight forward while holder->object is easy :stuck_out_tongue:

If you are using a non grippable component just adding the VRGripInterface to it and setting defaults for everything (returning the values in the functions) you can just use the passed in motion controller on grip for logic.

You can directly copy them over, but you would have to keep in mind that they likely offer more features than you need and it would be best to learn what the blueprints do (more so since the template uses RPCs showing basic network setup of the graph). Also the controllers don’t need to be with a VRPawn to work, you can just attach them to your own.

I would also mention that the collision with walls is done with the collision system for the engine, you can create channels that the pawn doesn’t collide with and use view darkening / pull back or whatever you choose for there as well if you wish, the hard pushback isn’t best in every situation and many don’t like it (I do myself though), the pawns are just a base to allow for it and full movement without fuss.

Also I’m afraid that due to a now 5 month old and a full time job working on the plugin during my free time is about all I have time for ATM, I had to drop all of my freelance and tutorial work to account for helping at home, I will answer questions in PMs and here though.

working with 4.14.3?

i’m trying without success. In 4.14, the Pluging directory not work in the project directory. I put the Plugin in Engine/Plugin Directory and adding the “VRExpansionPlugin” in PublicDependencyModule… but when compiling, show an error and not compiling.

The error is relacionated with VRExpansion.lib or something…

Error LNK1181 cannot open the input file ‘C:\Program Files (x86)\Epic Games\4.14\Engine\Plugins\VRExpansionPlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-VRExpansionPlugin.lib’ VRTemplate E:\Documents\Unreal Projects\VRTemplate\Intermediate\ProjectFiles\LINK 1

Error Failed to produce item: E:\Documentos\Unreal Projects\VRTemplate\Binaries\Win64\UE4Editor-VRTemplate-8716.dll VRTemplate E:\Documentos\Unreal Projects\VRTemplate\Intermediate\ProjectFiles\ERROR 1

Error MSB3075 The command ““C:\Program Files (x86)\Epic Games\4.14\Engine\Build\BatchFiles\Build.bat” VRTemplateEditor Win64 Development “E:\Documentos\Unreal Projects\VRTemplate\VRTemplate.uproject” -waitmutex” exits code 5. Verify that you have sufficient rights to run command. VRTemplate C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 43

Sorry for my english.