VR Expansion Plugin

's tutorial didn’t attach tracked devices to the skeletal mesh either, he ran base IK nodes to the relative positions. As for how they got it working with VRE, the same way, attaching to the parent relative component and running IK.

As for the FPSPawn, that is mostly for out of VR testing as you don’t have to make code changes and can test with parity, I wouldn’t suggest using a VRCharacter for FPS unless it is really required due to the additional overhead, if you must then at least you would want to turn ticking off on the root capsule (template fps pawn has it on for replication and depenetration testing emulating room scale).

I know of a few games using a vrcharacter for AI as well as the player and possessing back and forth between them, but its just something where you would want to profile heavily. Some parts of the VRCharacters are actually cheaper than the stock characters, but there are a lot more ticking elements due to the trackers and root offset and some of the movement logic is switched around to avoid extra costs that VR doesn’t need that may effect FPS behavior (mouse latency).

P.S: Caps is a dirty habit I picked up for word emphasis in text boards where there was no underlining back in the day, here underlining could work so i’ll try to remember to use it, but you likely shouldn’t read too much into text formatting.

Thanks, I understand what to do now.

Hi all,
i have slight problems understanding how to get hold of the c++ sources from https://bitbucket.org//vrexpansionplugin/src/Master/ (the ones you put into a project and then compile them by yourself) and at the same time also get all the stuff implemented in blueprints and the example levels from https://bitbucket.org//vrexppluginexample/src and/or the exampe binaries. While i managed to compile the vrexpansionplugin source for version 4.20.3 i could not do so for the current source at vrexppluginexample https://bitbucket.org//vrexppluginexample/src/default/. I suppose is because the latter are meant to be used for the newest engine version of 4.22?

So to sum it up: I would like to have full access to the c++ stuff as well as to the example blueprints and levels from vrexppluginexample. And all of that for engine version 4.20.3. Could someone give me a hint on which sources i would have to download how i would need to throw everything together? Thx so much in advance and cheers all!

Download the example template locked branch from 4.20, generally later engine versions of the plugin are not compatible with earlier engine versions due to how much changes in engine between versions. I back port fixes to earlier source builds when I can directly do so though.

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

Has the current branches listed for the example template, the template comes with the plugin source as well.

Hey there, Been working on a project for the passed year, using plugin. Recently, been trying to switch over to using your custom grippable skeletal meshes, for our NPC interactions, However, after some testing in the vr expansion plugin example, it seems grabbing the GrippableSkeletalMeshComponent has about a 50% chance to cause a freeze/crash. Is common/known? I can’t really maneuver around C++ too fluently to make seem like it’s worth the hassle of fixing. Meaning I might have to go back to our own custom grabs for Npc’s which is a shame, because having our games grip’s be universal would round things off much better in terms of development.

loops out in the crash report about 1000x

Can post some gameplay footage later if you’d like. But generally, 4.22… Just go ahead and try grabbing a physics mannequin a bunch of times… Crashes on a new template as well.

Any help would be much appreciated, thanks in advance

Mmmm, no that is not common / known, there are actually a lot of people gripping skeletal meshes and NPC’s for that matter. However I did recently switch a lot of the backend code to the engines new physics interface in order to prep for Chaos support and don’t know how many of those users are on that new of a version.

I’ll see if I can reproduce that, engine shouldn’t be calling OnGripMassUpdated over and over unless you are changing a body property.

Interesting, good to know it’s not a widespread issue, I’ll keep working on debugging further. What kind of property changes could you be referring to that could be causing sth like ? Only thing I can think of, off the top of my head is switching sim physics enabled on/off.

I found the issue, when porting to the new physics interface I missed passing in the gripped bone name to a function, which is why was only happening with PerBoneGripping enabled.
It wasn’t removing a delegate binding and was causing it to re-trigger every grip creating a loop.

Its fixed, just testing in 4.22 and then updating both branches, it will be live in a couple of minutes.

Think I should add a per bone gripping element in the example template to throw some tests at periodically.

Edit Patch is live on both repositories

You’re an absolute legend, amigo… That was much faster than I expected. I’ll re download that module and give it a try when I get back.

And here’s a quick preview to the current progress of the game in case you’re interested, or would like to add it to the roster of WIP projects using the plugin…

I’ll link an updated one later if you’d like, after I’m done porting over the updated NPC grip interactions.

Again, thanks so much for the prompt fix, I wasn’t expecting that, and really appreciate it.

**Edit: Tested, GrippableSkeletalMeshComponent seems to be fully functioning now, with per bone grip set as well. Thanks again!

Yeah sure, it looks cool, I’ll add it to the use cases list under WIP.

Question I can’t get figured out on my own -

When holding an object and it gets stuck say behind a wall or whatever, and it’s dropped because it gets too far away –

Where is a function called for that? Basically, I need to do some things when an object is dropped (swap some animation, turn some vis on/off of stuff). Is that only in the motion controller code? I want to add an additional call / function do do those things…

Thanks!

There are events on the controller itself, OnDroppedObject And OnGrippedObject that are fired when their respective events happen.

Also you can manually override OnGripOutOfRange which will then fire off instead of auto dropping the object, letting you act on the out of range message yourself instead (even if it is just to drop it yourself anyway).

Hi,
I’m starting using fantastic plugin (I think Epic should include it by default in new versions, it’s so powerful and useful I can’t program VR without it ) and want to use it to teach VR programming; one function I need is to up or down the height of the avatar or hands (to grab something that is too high or too low for example), pushing some key or trigger button (we work without HMD plugged, working with monitor, keyboard and mouse, and later with Vive and wands) ……which is the parameter I’ve to modify? I’ve been modifying some parameters of “VRMovementReference” (of “VivePawnCharacter” ) and another variables without visible results.

Another question: is slicing objects operative (in UE 4.22 implementation)? Or is there any previous action I’ve to do to the mesh? Knocking the cylinder with the sword of the project example doesn’t nothing (when I touch the cylinder with other controller sometimes it converts to the desk (?) and the code seems to be broken
Sorry if it has been answered or it’s trivial, but I’m stopped at point

Congratulations for plugin and making it open and free . Thanks!

#1: If you want to increase the height of the player you can either move the NetworkSmoothing component upwards, (it is the root of the tracked devices), or modify the Z value of the CapsuleOffset var on the RootCapsule. I would say to change the world scale but that doesn’t sound like what you are after.

Generally though a remote grip setup is preferred over direct height manipulation from what others have been doing.

#2: Yeah slicing works, it has a bunch of extra logic involved in that slicer though, you have to activate the blade (trigger, it will glow then) and then strike through it with enough force and an impact angle within 15 degress of direct to the surface if I remember correctly).

If it changes to the desk (? lol) sometimes then there might be some BP references being screwy and I’ll need to take a look at it and clean it up. Its been in the template for a long time and I don’t check into it often so its possible that the asset has some broken references from engine upgrades.

Hi ,

I’ve used the CapsuleOffset method and it works like a charm! I don’t understand the other method of “remote grip setup” you said, but now works
And slicer the cylinder was working all right, but the problems was that I’ve very little space and working seated , and I didn’t knock with too much strong the cylinder (or moving fast enough the Wand to avoid an accident at my desk) ; I ‘ve tested applying more force (speed) and doing at correct angle now it works flawlessly

Now I want to experiment recording with motion controllers inside UE (I know you can do that with external tools, but want use Sequencer), to do some basic Mocap, I hope VRExpansion can be useful too.

Lot of thanks for your help and your efforts making VRExpansion so powerful and updated!

PD: Epic please, integrate VRExpansion in the engine!

You can do that, but you can also directly record replays as well since everything is networked.

As for the slicing, I was playing with some melee concepts back when I made that and I think I over complicated it since a lot of people have been confused about it. I’ll likely re-work / replace it when the melee grip script is ready and add some other things in a dedicated melee room.

Virtual gun stock – is that detecting components as well? I have a gun with an extendable stock that it doesn’t seem to be detecting… Is that something I’m doing wrong?

? You wouldn’t be using the virtual stock with a gunstock accessory. The virtual stock is for smoothing if there is no physical stock.

With a physical stock you just want to align it, and unless that stock has a tracker or an input interface there isn’t any way to automatically detect it regardless.

nono - the gun in game has an extendable stock! No *physical *stock.
The stock IN GAME is one the player can extend back or slide forward to put away

Then you’ll have to activate virtual stock mode manually when it is extended, if you want it to track to a custom point as well then you’ll have to set the VirtualStockComponent of the grip script to one that you move and track as you wish, the default mode is to track a neck offset from the HMD.

There really isn’t any way for me to automatically know that you are using a specific scene component as a stock. Also the virtual stock in that grip script likely isn’t what you are looking for if you want the butt of the gun to literally mount to the shoulder, I don’t provide that type of virtual stock in that grip script as its unwieldy and less fluid.

You can implement it yourself in a custom one or an override of the gun tools though.