VR Expansion Plugin

Thank you! and yes, I see that! I’m testing out 4.21 with your newest build now! I did have one question, if you could help me out, though I know it’s a pretty outdated question. If i could get figured out before release that would be dope:

How do I change the pickup/use buttons in your 4.16 version? Right now its trigger to pickup/use, grip to drop. There doesn’t seem to be a way, anywhere in UE4 to change that. I’m guessing its in the C++ code? But I don’t know C++ lol. If there’s a way to do it in blueprints let me know!

I don’t think the gameplay tags were in that template, or the controller profiles. But you can literally just use different key binds to call the “CheckGrip/Drop” functions.

If the gameplay tags WERE in it then you can just change the defaults in the character / per object.

I swear I looked but I’ll look again, thank you!

Having trouble with using your plugin on dedicated server. So what I did:

  1. have a working dedicated server setup on my project (using 4.21)
  2. imported VR Expansion (put to /Plugins and added the string to .Build.cs)
  3. trying to build under Development Editor
    It pops me following: “Couldn’t find referenced module “ShaderCore”.” It is referenced by plugin’s .Build.cs. Any idea how to fix it?

That has nothing to do with a dedicated server, you are building for the development editor, also ShaderCore is a core module and one that you have. I haven’t seen that before but you may want to try regenerating your project files if you haven’t yet, that is generally the first step after 1-2 above and you didn’t list it.

I’ve tried to regenerate VS files, but no luck.
It looks like it is not included in my source build (but I’ve cloned it from 4.21, so don’t know whether it is possible or not). Unlinke RenderCore which has separate folder, ShaderCore is only a class and is located inside RenderCore folder for my build.
Also tried with example project. So the most precise list of my actions for now:

  1. set up dedicated server source
  2. loaded example project
  3. switched UE version on example project to server source
  4. added …Server.Target.cs with all stuff
  5. generated VS project files
  6. opened .sln
  7. trying to build under Development Editor
  8. getting error Could not find definition for module ‘ShaderCore’ (referenced via Target -> VRExpansionPlugin.Build.cs) VRExpPluginExample …\UnrealBuildTool

Is it possible that loaded source is incomplete?

You should have Engine/Source/Runtime/ShaderCore as a module in 4.21.

I checked real quick and the new render branch changes for 4.22 move it to render core, you pulled the wrong engine branch in (likely master branch), you need to specifically pull 4.21.

Really surprised that was the only initial error you ran into, 4.22 is shifting a lot around.

That makes sense. Thanks!

Noting the recent commits and building a fresh set of precompiled binaries.

Patch notes below.


Fixed a net smoothing bug with linear smoothing that could cause crashes
when rotating. Exponential smoothing is the engine default when using smoothing
and smoothing is off by default in the plugin so  took awhile to run into.

Now initializing some vars that Oculus may not be setting on mobile
 would be a bug in the base engine source, engine source is still bugged but plugin motion controllers
should function. Issues happen when tracking is lost on oculus platforms (IE: Oculus GO controller and app loses focus)


Made GunTools virtual stock settings part of the global settings structure
 makes it easier to store a copy in the character and replicate it to the server
as well as from the server to the gripped object for setting.

Also added the option to UseGlobalVirtualStockSettings in the gun tools grip script.
When enabled it will load the current settings from the global settings (default true and only for locally controlled).
When disabled it uses local settings of the script.


Added custom movement events for climbing and low grav movement modes. (EventUpdateClimbingMovement/LowGrav)

Is a better way of getting the hand offset than in the actors main tick, run the same logic but here so that it is taken in
the same frame instead of the next.
c++ projects can still override PhysCustom_Climbing to do the same or they can overide the EventUpdateClimbingMovement_Implementation

Also am now properly setting / clearing the climbing variables, the time moments when it
was being done wouldn't work with the new placement of the query.


Many lever improvements on the back end
mostly fixing Axis_Y issues since it is the last order of operations with Quats.
Also added SetLeverAngle function

Moved button overlap bindings later in init to avoid an editor copy error.


Added a BP Accessible IsLocallyControlled to the motion controllers, it can be very useful, mostly
with avoiding extra casts to check for local owner OnGrip ect.


Changed LerpToHand to be a fixed time period of lerp, not speed based.

Added a control distance variable to the LerpToHand gripscript
If the distance to the hand is smaller than  value then the lerp
script won't activate on grip.

Default of 0.0f means that it will always activate.

Also added a curve editor to it that is optional.



Added some brief descs to the headers for the Grip scripts and removed the
SHOULD NOT BE USED warning from gun tools.

Fixed a scaling bug with the auto SnapToSocket setup when gripping.

Do you have any recommended methods for replicating a grip script correctly so all clients see whats going on?

Assuming that it exists on all clients it should just work. If there are specific states that you need to pass around like “locked”, you can use replicated variables and RPCs like you would normally, it passes them on through its owning actors network stream.

Hey, I’ve been developing a VR project for a few months now, and have only just recently integrated the VR Expansion Plugin. I’ve managed to get everything working, except picking up objects. Are there special parameters you need to apply to a grip-able actor in order for it to be picked up? I tried to use the bottle actor (included with the example project) as a test case, yet that didn’t work either. Is there any way you could be of help in finding where the issue is? Thanks much.

Strike that last comment, I found the prevailing issue.

So I’m finally starting to get the hang of Unreal so far, but there’s one thing I haven’t figured out yet: Is there a way to kill the simulation of physics after attaching components together with the attach to node? If I pick up an object, then drop it into a trigger that attaches the object, it works fine. But if I keep holding it all the way into the trigger, then release, physics will automatically take-over. Turning “enable physics on drop” off works of course, but I only want it off after attachment. Attached is how I’m doing it right now.

One other thing: How do I prevent the grabsphere from overlapping with box collisions, so it doesn’t grab any?

will need a bit more context on what RC is, is it your right controller?
On the second note, the grabsphere traces the VRtraceChannel to grip things, with the world static and world dynamic objects trigger hand animation. ignoring those collision types in your box collision will stop it, or if its a grippable object with the interface you could set it to deny gripping if you dont need it to be grabbed. Alternatively you could set a custom channel for specific objects you want to check for.

You can manually simulate post release on those objects, or even post drop run an GetOverlappingActors check and unsimulate / attach to something.

The newer versions have the DropAndSocket pathway which slots things in for you in a single node call as well.

https://.bitbucket.io/VRExpansionPlugin/VR/GripMotionControllerComponent/nodes/DropAndSocketObject.html

The template potion implements that now, as well as the gun for the belt.

RC is “remote control”. A basic object that can be attached/detached to areas.

As per the trace channels, my box collisions have none of those options on the template. Do I need to enable something to view them?

(Also, neat to see you over here. I remember your KSP cinematics, they were awesome. You did my B9 aerospace rocket as a picture, and I still have some of em printed out around here…)

Hmm, are you using the template project as a base for yours or just the plugin into your own?. if its the latter you probably need to defer to since they arnt showing up.
You can find and add custom collision responses in " project settings-> engine-> collision"

Thanks, surprising to run into you again, that was what… 6 or 7 years ago

It’s the template project, but I’m pretty sure I somehow screwed up the project settings, awhile ago I lost the ability to grab objects in non-VR mode, had to re-import inputs. I’ll go look at my backup. EDIT: Looked at the backup, yup, it shows up properly there. Not sure why.

One thing I’m not quite sure of is how to setup the custom tracing, though.

Also yeah, quite interesting, very long time ago.

For custom tracing channels have a look at tutorial : https://youtu.be/ttn9SpAhK-g?t=55