VR Expansion Plugin

The example template is “intended” to be a bunch of implementation examples, since the complexities of a SDK are hard to just describe how to actually utilize. Ravans videos are beginner tutorials for how to implement the core concepts from the ground up (which would also help to understand some of what the example template does).

In the end, its preferable to go ground up, but that is more expected of a experienced developer team, the majority of the users are also hobbyists or part timers and most of them are adapting the example template and just throwing out things they don’t need.

Games like DropInVR are essentially the template with character customization and with a ton of game logic wrapped around it, while things like ZeroCaliber are ground up I believe, its really up to you and what you feel comfortable with. My concept of best practices doesn’t work as well for beginner developers and it depends on how you learn and work best for yourself.

Check out my tutorials as well. A simple step-by-step tutorial for people who are new to the engine :slight_smile:
https://digital-messiah.com/blog/

Eanir’s tutorials are pretty great! Wish you would keep going my friend.

Does anyone have suggestions on how to move an enemy character through gripping? I use a physical animation component to allow per bone gripping for the limbs. I would like to move the entire character by pushing and pulling whilst gripping. I intend to use ik for foot placement, curious how to impart force to the whole character and capsule whilst using the plugins gripping (specifcally interactive physics)

Well characters don’t actually respond to direct physical forces on the submeshes, as the character itself is the capsule. You can impart the forces to the capsule if you want too with AddForce on the character, or manually handle it following.

Hi again,
is most likely not VRExpansion related, however all of a sudden i do have a problem with my controllers in the VR expansion template.

For some reason the following movement modes in the template do not work any longer, meaning if i move the thumbstick the character won’t move:

  • DPadPress-ControllerOrient
  • DPadPress-HMDOrient

At the very same time the following hover modes do work:

  • DPadHover-HMDOrient
  • DPadHover-ControllerOrient

The DPadPress versions used to work until now, but all of a sudden they stoppes working. holds true for the Index controllers as well as the Vive controllers.

I confirmed the problem is also showing in a fresh/plain VR Expansion Template project. Also i haven’t messed with the DefaultInput.ini as far as i know. Well shouldn’t be an issue with a plain template project anyways right? So is there some external setting which i might have messed up?

Cheers!

Hi ,

I have a regular UE4 pawn with two GripMotionControllers in it. I noticed that when I grip an object and move the pawn´s root component using a SetWorldPosition, the gripped object lags behind the controller a bit, and the faster I move the bigger the lag (I use to move the player around the map using the trackpad on the controller).

The pawn and the gripped object are ticking in the pre-physics group, so in theory the plugin should have all the info it needs to correctly set the position of the object right? only happens if I grip something with interactive, the moment I release the object the controller position works as expected.

Am I missing something? Can I modify the pawn or the grip in any way to remove lag?

Thank you very much in advance, and thank you for great plugin! :slight_smile:

Cheers!

the gripped object isn’t “attached” to the motion controller unless you use the attachment type of grip. So no, moving the character manually AFTER the object is moved wouldn’t work correctly with any other grip type, you need to manage your tick orders. If it is a physics grip then the physics thread may run afterwards, but the target point that it is trying to reach is set back in the pre_physics tick.

Destroy Session on Client Doesn’t work.
if i destroy session on the server all clients and the server go back to the main menu level.
But if i call destroy session on one of the clients it succeeds (i placed a print string to check) destroying the session but the client doesn’t leave, all other clients and the server still see him and his movement.
i also tried the destroy session on owning client vrExpension node, same result. destroy session only works on the Host player.

One more finding: On the same system, opening a plain VRExp Template in a different engine install of 4.24, all movement modes work.

Destroy session isn’t a plugin node, its a base engine node.

And it should be working fine unless you are directly IP connecting to a server instead of using JoinSession.

Sounds like you overrode the default SteamVR bindings for the controllers? You’ll want to check your bindings for that launch in the steamvr overlay.

I assume that both builds were in 4.24.

No, that is the strange thing about it. So in 4.25 the DPadPress movements do not work (the DpadHover movements work), neither in my edited project, nor in a fresh template project of yours. In a fresh project in 4.24 all movement modes work…

​​​​​
Check what they are bound to in steam input overlay, they have been changing around the input module a decent amount. The actual bindings for the vive wands I don’t think have changed since 4.24 in my template at all.

So I tried to implement with a physics constraint and got :

https://youtube.com/watch?v=QqEhyg1wzKI

It works pretty great when you grab on, but it’s snapping on wrong. What I want to do is snap on using the current rotation of the hand, but the position of the attach point. At the moment the snapped rotation is based on the attach point which isn’t what I want. I was getting confused with the transforms in grasping hand and how to use them to get the functionality that I want.

My (slightly) edited InitializeAndAttach function in GraspingHand: blueprintUE | PasteBin For Unreal Engine

Thanks again for the plugin, it’s been so helpful with our development, and thanks for being so helpful in these forums.

When you set the meshes world transform in that attach logic, don’t set the rotation, just set the location to match, it will retain its current orientation then.

You could also implement GetClosestSocketInRange for a subclass of the lever and setup passing out an aligned transform.

Edit I made an example of the second method in the new BPSnippets section of the plugins website:
https://vreue4.com/bp-snippets?secti…pping-snippets

See the “Snap to location but keep rotation” snippet in the gripping snippets section. You could run some checks to force a general alignment as well if you wanted too.

Grippables in general could call the parent implementation for the socket loc, but levers/sliders specifically don’t implement that (if you are using a physics constrained object then call the parent implementation for the socket transform part and just do the lower part of the graph).

Hi,
I’m trying to use my own knife like default one but even though all the settings are the same, mine won’t stab. I tried to change the stab constraints and so on but not much changed.
I’m new to blueprint and coding stuff. I’m still trying to figure out what does what in the plugin

here is a video:

Well for one your collision on that knife is waaaaay too thin, its tunneling right through the object. For two once you have that corrected you need to check your collision settings on it, i can’t tell much from the SS because you didn’t show the grip script settings.

Thank you!! I fixed it. First I made the collision thicker as you suggested but that alone didnt fix the clipping issue. Turns out my damping and stiffness values were too high. After adjusting them, I only have very minor clippings. And for the stabbing: Even though I literally copied dagger and only changed mesh, the ‘penetrate with only with two hands’ setting was checked, I unchecked that and lowered required velocity for penetration.

I still need to tweak the settings a little bit. Like penetration depth and gripping locations.
The required velocity for penetration needs to be very low for my mesh to penetrate… I have to investigate that too.

After penetration, the knife slides into the dummy. Is it because of the physics material settings? Currently Stabbing kind of feels like we stab something that has hard shell on the outside but the inside is empty. Like it’s hard to stab but after we stab it slides in like butter. Is there a way to change that?

But nonetheless, I’m very satisfied with the results.Just nitpicking.

is a great plugin! Thank you for awesome plugin

Video:

You can adjust the strength on the X axis of the stabbing constraint to adjust how hard it is to slide once penetrated. Its something that you may want to do per weapon based on its mass or the density of the physics material that you are penetrating. That part is all left open out of the script itself so you shouldn’t have any issues playing to your hearts content on tweaking it.