VR Expansion Plugin

Thanks, glad to hear about the other developers. I realized the plugin was not at the latest release so that couldn’t help. Thanks for the fast response!

I finally have some basic weapon gripping working (I struggled a little bit even with the guides you so kindly provided, but I did get there). The problem I’m having now is if I’m holding a weapon and I stretch my hand out as far as I can, the gun is “floating” past my UE mannequin’s hands. I’m under the impression that using slot grips should be preventing that and I might just be missing something, correct? I’ve set up a VRGripP1 and VRGripS1 on my weapon skeleton. Why are there two “Optional Bone to Grip Name” inputs on the Grip Component function? The interact node in my screenshot is just an interface call I’m using to add the gripped item to my inventory and store it as the currently equipped item (goes back and breaks a loop of overlapping actors once the closest one is grabbed).

By the way, I intend to become a $10 Patreon when the paycheck hits :slight_smile:

Slot grips define where relative to the object that you want the controller at (ie: it positions the object relative to the controller), it doesn’t force the object to sit anywhere on your body mesh (it doesn’t even have a way to know anything about your body mesh). You can SetPivotComponent on the controller to a scene component that you place on a socket on your mesh though and it will do that, generally though your approach is less ideal than allow bones to stretch or calibrating the body so that they can’t out reach the full body avatar that you made, otherwise you will get a lot of annoyed players with below or above average size.

As for the double BonetoGrip, its a typo in the grip component node, just fixed it. That node is the least used of all as generally you should be using GripObjectByInterface or GripObject instead. Also you shouldn’t be gripping a component primarily unless you have a very specific reason, most grips should be on actors, and on interfaced actors for that matter.

Hmmm thank you, I’ll look into the bone stretching solution. I’m only a few months fresh to UE and game development overall so that’ll be something new to learn. I definitely want that approach to accommodate for longer/shorter arms just as you say.

Before I started using your great plugin (the main thing I wanted it for was for sort out of the box roomscale, but I decided it would be best to just make more use of other stuff it offers), I was just attaching my weapons to my hand’s socket, and it would stay there regardless of stretching beyond the skeleton’s default limit until I decided to detach it when releasing my grip, so I take it the slot gripping isn’t attaching to sockets in the same way? I’m genuinely curious on what’s handled differently there.

It follows the actual motion controller, my plugin doesn’t have any way of knowing specifically what mesh you want to deal with. But that is why the PivotOverride exists, you can define any scene component as the controller pivot and all grips will be offset from there.

The plugin only has one grip type that is actually attachment, the rest are sweeps / physics grips.

I thought “rep grip settings” will also replicate grip scripts’ AdvSecondarySettings, but it doesn’t.
what’s the best way to replicate secondary grip influence (in a client auth situation) since you moved setting to grip script?

thanks!

edit: even if secondary grip influence is set as default value in a grippable bp (e.g. secondary grip shouldn’t influence pistols), setting is ignored server-side when the client grabs it (host take into account client secondary grip, client dont).
That said we need to change it at runtime before gripping and sync host as well as other clients (we have an options that let users disable secondary grip influence).

Sounds like you have the bUseHighQualityRemoteSimulation turned to off? When not true it will only do light two handed calculations to save on cost on non local clients.

As for replicating on the clients settings, those settings can be stored in the player controller and passed up to the server to apply on spawn or on grip to the object. Generally it would be better to just store them in the PC and set them on gripped objects by retrieving those replicated values.

I didn’t want to automatically replicate these in all guntools grip scripts as generally those specific settings are global and should be pulled on a client by client basis and applied instead.

Edit If you have specific settings that you want the client to be able to modify, also lets you just store and pass on those specific ones to new grips / spawns. IE: OnGrip in the base class, get player controller of gripping character, set grip script settings. Or if you don’t let weapons be swapped back and forth, just do it on spawn.

Hi again, I haven’t had much time to work on my project lately but now I do have my weapon gripping working pretty nicely. I’m seeing one strange behavior. I can pick up my weapon and drop it, but then I can’t pick it up again. It looks like once dropped, the item isn’t being detected in the ‘get overlapping actors’ node which I have set to filter by class on grippable skeletal mesh. Any idea what might be wrong there? I am definitely overlapping it when it’s on the ground as I made the collision sphere visible (even stepping away and back in still doesn’t get it picked up). The only extra step I’m taking after the Drop Actor function is removing the item that was in my hand from my player’s inventory (just updating the appropriate array element and clearing it).

You aren’t removing channel collision on grip are you? Many people do that for one reason or another.

Nope not at all, the only thing I’m doing after the drop actor is removing the object from my inventory, kind of puzzled by one. I’ll make a new grippable BP actor that doesn’t go into my inventory so I can cut that execution off and see if it works then.

Hello there! I’ve just started going through the Intro and setup video on the tutorials page created by Ravan but have got an error message popping up saying that the OpenVRExpansionPlugin and VRExpansionPlugin modules are missing or built with a different engine version.

When I press the Yes button to rebuild them the progress bar goes to around 90%ish then I get another error message saying MyProject2 could not be compiled. Try rebuilding from source manually.

I’ve tried 4.23 and 4.22 but still get the same errors coming up.

Could someone please ELI5 because I haven’t done much developing for the last 30-odd years so I’m more than a little rusty lol

I’ve just downloaded and installed the latest version of Microsoft Visual Studio Community if that helps! :smiley:

Are you downloading the template or the plugin itself? If its just the plugin itself then you need to either use the pre-compiled binaries, or compile the project in Development Editor mode in visual studio.

Oops, didn’t realise that I could just download the Template! Thanks for the help! :smiley:

Hi,

I’m having an issue with picking up objects, in the editor i pick up an object and another one spawns and i can pick that up too. When connected to my dedicated server grabbing the first item works but the re spawned item can be very hit or miss, if i keep my hand near it and very surely grab it sometimes it will pick up sometimes it wont.

Is there anyway to make it more accurate on server?

Cheers,

Sounds like you are trying to detect location and hit on the server side only instead of the client? Depending on your controller replication rate it can be a bit off due to lerping between updates when the grab comes in to the server.

is why in the template I run the hit detection client side and have the server just verify if the object is grippable or not if it is a server authed grip mode. You can still add a server sided rough distance check as well to enforce no remote grips.

If your hit logic is client side, then your respawns collision / position replication may be off, make sure it isn’t set to static mobility.

i was using your pick up cube as a base and adding what i needed, so it weird that it doesn’t work properly. ill have a look at where the detection is happening

Shouldn’t base anything off of that generally, it is an example of converting a non grippable object to the plugin interface. Its from epics template, it is preferable to use one of the prefabs (grippable static mesh actor) when possible.

Hi ,

I’m trying to nativize my project (UE4.22) but I’m getting when building:

fatal error: ‘…/Plugins/VRExpansionPlugin/VRExpansionPlugin/Source/VRExpansionPlugin/Public/VRBPDatatypes.h’ file not found

From what I can understand, the nativization process moves the files to a different folder, so relative paths don’t work anymore. I read the documentation but it’s not very explicit on how to fix

“If you add the path of header to FilesToIncludeInModuleHeader, under [BlueprintNativizationSettings] in DefaultEditor.ini, you can fix many issues related to missing headers.”

I tried adding line to my DefaultEditor.ini but it doesn´t seem to do anything…

[BlueprintNativizationSettings]
+FilesToIncludeInModuleHeader=E:/UE4/GladiusQuest/Plugins/VRExpansionPlugin/VRExpansionPlugin/Source/VRExpansionPlugin/Public/VRBPDatatypes.h

Have you tried to nativize the plugin as part of a blueprint project? Do you know how to fix ?

Thank you very much in advance.

Yes and I test it on every release and it has been functioning fine.

What is the rest of that error? Before / After it in the log?

is the full log. I should have mentioned that I’m compiling for Android (Oculus Quest), maybe that’s why is not working?

Thank you very much for taking a look into , have no idea how to fix it… :confused:

UATHelper: Packaging (Android (ASTC)): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Android (ASTC)): Running: C:\Program Files\Epic Games\UE_4.22\Engine\Binaries\DotNET\UnrealBuildTool.exe GladiusQuest Android Development -Project=E:\UE4\GladiusQuest\GladiusQuest.uproject E:\UE4\GladiusQuest\GladiusQuest.uproject -NoUBTMakefiles -remoteini=“E:\UE4\GladiusQuest” -skipdeploy -Manifest=E:\UE4\GladiusQuest\Intermediate\B
uild\Manifest.xml -NoHotReload -log=“C:\Users\xxxxxx\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\UBT-GladiusQuest-Android-Development.txt”
UATHelper: Packaging (Android (ASTC)): E:\UE4\GladiusQuest\Plugins\VirtualAgeStats\Source\VirtualAgeStats\VirtualAgeStats.Build.cs: warning: Modules must specify an explicit precompiled header (eg. PrivatePCHHeaderFile = “Private/VirtualAgeStatsPrivatePCH.h”) from UE 4.21 onwards.
UATHelper: Packaging (Android (ASTC)): PLATFORM_ANDROID_NDK_VERSION = 140200
UATHelper: Packaging (Android (ASTC)): NDK toolchain: r14b, NDK version: 19, GccVersion: 4.9, ClangVersion: 3.8.275480
UATHelper: Packaging (Android (ASTC)): Parsing headers for GladiusQuest
UATHelper: Packaging (Android (ASTC)): Running UnrealHeaderTool “E:\UE4\GladiusQuest\GladiusQuest.uproject” “E:\UE4\GladiusQuest\Intermediate\Build\Android\GladiusQuest\Development\GladiusQuest.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
UATHelper: Packaging (Android (ASTC)): Reflection code generated for GladiusQuest in 7.2173115 seconds
UATHelper: Packaging (Android (ASTC)): Compiling Native code with NDK API ‘android-19’
UATHelper: Packaging (Android (ASTC)): Writing manifest to E:\UE4\GladiusQuest\Intermediate\Build\Manifest.xml
UATHelper: Packaging (Android (ASTC)): Building 14 actions with 12 processes…
UATHelper: Packaging (Android (ASTC)): [1/14] Module.NativizedAssets.gen.2_of_5.cpp [arm64-es2]
UATHelper: Packaging (Android (ASTC)): In file included from E:/UE4/GladiusQuest/Intermediate/Plugins/NativizedAssets/Android/Game/Intermediate/Build/Android/UE4/Development/NativizedAssets/Module.NativizedAssets.gen.2_of_5.cpp:5:
UATHelper: Packaging (Android (ASTC)): In file included from E:\UE4\GladiusQuest\Intermediate\Plugins\NativizedAssets\Android\Game\Intermediate\Build\Android\UE4\Inc\NativizedAssets\Bow3__pf1418999182.gen.cpp:8:
UATHelper: Packaging (Android (ASTC)): E:/UE4/GladiusQuest/Intermediate/Plugins/NativizedAssets/Android/Game/Source\NativizedAssets/Public/Bow3__pf1418999182.h(5,10): fatal error: ‘…/Plugins/VRExpansionPlugin/VRExpansionPlugin/Source/VRExpansionPlugin/Public/VRBPDatatypes.h’ file not found
UATHelper: Packaging (Android (ASTC)): include “…/Plugins/VRExpansionPlugin/VRExpansionPlugin/Source/VRExpansionPlugin/Public/VRBPDatatypes.h”
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): 1 error generated.
UATHelper: Packaging (Android (ASTC)): [2/14] Module.NativizedAssets.gen.5_of_5.cpp [arm64-es2]