Download

VR Expansion Plugin

The bullets are set to still collide with the gun, if you turn that off it won’t care. I keep them colliding as it helps to stress test some things from time to time. You wouldn’t really use large spherical projectiles anyway on a game gun usually.

So far this plugin looks so powerful. I’ve yet to dive into it deep yet but I do have a quick question. Should the hand animations work out of the box with the example level? When I open up that project and mess around in the level everything works perfectly except I get no hand animations. I’m on the Rift and running UE4 4.25

Sorry if this is a dumb question. I read through most of the documentation and didn’t notice an obvious answer so I came here. Thanks for all the hard work that’s gone into this!

No, I don’t use any of oculus’s specific stuff, you can port it in at will. Since oculus did a good job of handling an interface for it themselves there was no need for me to re-do the effort.

Going into OpenXR when it is stable I will be supporting hand tracking through the OpenXR interface though so that it is cross platform and doesn’t require extra effort. My open input module for the steamvr hand tracking will be deprecated and everything will be unified in the main plugin itself under openXR.

What exactly is it that I need to port in? Is it just the animations that don’t work with the Oculus or would you recommend not learning from the example level if I’m developing for Oculus?

I’m not entirely sure what animations you are talking about, I thought you were talking about the hand on controller animations or hand tracking streaming?

If its the hand streaming that isn’t a part of the core engine until 4.26 and is on a seperate oculus branch.

Hi,
i have a question regarding replicated movement of an object with a custom grip script on it.

So i created a gun-slide (ParentClass: GrippableStaticMeshComponent) using the VRGrip interface with GripType set to CustomGrip. For that custom grip i implemented movement constraints and some other stuff. The slide itself is being added to the parent weapon as a child component.

For the slide movement there are two options:

  1. The slide is manipulated manually by gripping it. This works as expected and slide movement is also being replicated to other clients.

  2. The slide is moved through gun logic, namely shooting the gun. For this i am using SetRelativeLocation on the slide component. Now when in single player, this SetRelativeLocation works without problems. The slide moves forwards and backwards as my logic dictates it to do. However when trying to replicate that movement the SetRelativeLocation does not move the slide component at all.

My current approach to replicate the slide movement mimics what the template’s GunBase-BP is doing in FireGun -> FireGunServer -> FireGunLocal. So i’m having a call to the server who then again does a Multicast to all other clients which again fires a function “MoveSlideLocal”. (Like stated already the code inside MoveSlideLocal works fine in singleplayer) I can tell that the RPC arrives at the clients, because if i add some other stuff to the “MoveSlideLocal” code - e.g. a particle spawn - then i see that happen on all clients. However the SetRelativeLocation node has no effect at all.

So my question is, whether there is something in the GrippableStaticMeshComponent / VRGrip that i need to take into consideration when trying to replicate non-gripped movements. I also found some other general threads from users having problems using replication with regard to SetRelativeLocation, however those were old and i wasn’t able to draw any conclusions from those.

Cheers for any help on this!

Physics Grasping hands left hand seems to grab things with an incorrect offset compared to the right hands grasp… Is this normal? It seemed to happen in the default template too.

Also having an issue where if letting go and grabbing an object in the same frame with the left hand will rotate and scale it down to it’s default transforms I believe it’s using the controllers transforms., but the right hand keeps the item held in position fine.

What would be the right way to drop only 1 item from multiple items being held in the hand? If I have just one item drop, the grasping hand acts as though it let go of the original held item. What would be the best way to set this up, to let a single item drop from the phys grasping hand, while not breaking the originally held items grasp?

As always, any help is appreciated…

  1. I don’t remember any left hand offset no, but it is a separate skeleton entirely (since inversed physics are broken), the ideal left hand would be a mirrored and flipped version of the right but I don’t have one of those to work with. You may need to adjust the palm sphere a bit, also the gripping animation has some offset to it that is manually removed that the right hand doesn’t have. The non physics version should obviously be without the issue, I can’t take a hard look at it at the moment without recompiling shaders in 4.25.

  2. Dropping and gripping before the lerp back to the hand finishes could be a bad edge case yeah, you may want to delay until the hand has returned to resting before allowing another grip, or not return back for a frame or so. Its not physically possible to drop and grip in the same frame physically so I assume you are manually doing it.

  3. Only change animation state when the hand has zero held objects or not the one it curled around, its obviously going to be based on some game logic though depending on which one you actually curled around, you’ll need to put in your own logic to handle that, the grasping hands are an example, not a full fledged system, they are intended to be expanded on and be a baseline.

Hi there,

Do you have any examples of how to utilise the drop and socket system.

Thank you

They don’t just start further away, but one of the hands can get stuck in the floor as well upon start of game, until I start using the controller input, and then the hand seems to fly back towards me. This is using Grasping Hands, btw, so not sure if there is something to be tweaked when using that mode.

Sorry, not sure what you mean by re-zero’d base with 4.25. I am using 4.25 with SteamVR, of course, though.

No that entirely sounds like the hand isn’t tracking yet in steamvr.

Calling DropAndSocketGrip and providing a relative transform to the target parent and a reference to the target parent is all that is required. It will drop the object and attach ti at the given transform. The vive character in the template uses it for anything that returns true and a parent from the RequestsSocketing query.

So, I’m doing myself a stupid here trying to extend the GrippableActor.h

I’m running the latest template build and trying to figure out how to best implement the great tings in this plugin, however:

I’m getting these error messages:


>Match_Grippable.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl IGameplayTagAssetInterface::HasAllMatchingGameplayTags(struct FGameplayTagContainer const &)const " (?HasAllMatchingGameplayTags@IGameplayTagAssetInterface@@UEBA_NAEBUFGameplayTagContainer@@@Z)
2>Match_Grippable.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl IGameplayTagAssetInterface::HasAllMatchingGameplayTags(struct FGameplayTagContainer const &)const " (?HasAllMatchingGameplayTags@IGameplayTagAssetInterface@@UEBA_NAEBUFGameplayTagContainer@@@Z)

I’ve included the needed modules in the build.cs file and fully written out the path for the GrippableActor.h, deleted the binaries, intermediaries and all these things, and rebuilt the VS files.
Am I just doing this wrong, and these plugins are meant to be used some other way? I’ll admit I’m not used to referencing plugins directly, and most of my C++ experience is purely with the standard Unreal codebase.

The grippables have the GameplayTag interface embedded in them since you can’t do it in BP. If you want to make an extension to them you need to include the “GameplayTags” module in your private or public dependency modules list in your build.cs or it will fail to find the function definitions.

Unsure if this is a UBT quirk or not as to why its not linking correctly without manually including that module in references even though the plugin declares it.

1 Like

Ah yes, that did it. Tried sticking GameplayTags stuff in the #include, but did not actually think to put them in the build.cs, even though it’s obvious in retrospect. Thanks for the assist, and for this extremely useful plugin!

Added a discord link in the OP, the discord is now public with some private channels for supporters.

I’m getting a crash on the clients when server destroys session or when server kicks a client.
game crashes on all the clients but not on server.

here are the dump files:
https://drive.google.com/file/d/1ctZmlmZu-_FprHX05CoDJPGProRNonH3/view?usp=sharing

you have any idea why?

Your log shows the error in the VOIP Listener losing its player out from underneath it, destroy that before the actor.

how do I destroy VOIP Listener before the actor?

Do I unregister remote talker on all player controllers before exiting?
Do I destroy the VOIP Talker Component on all pawns on all clients and Server?
Do I fire the “StopNetworkVoice” Node on all Player Controllers before Exiting?

So I Fixed the Crash when server destroys session, just set all controllers to stop network voice before leaving.
But now I have Another Crash happening randomly during play , even if I’m the only one in the listening session. I think the crash happens rarely but when I teleport.
here is the crash report :

https://drive.google.com/file/d/153w…ew?usp=sharing

also in the editor, when i run the game it gives me these errors- the “ignore stop request for no user” when I start the game,
the “start network voice cant get the voice interface” when i run the start network voice or the stop network voice nodes,
and the “device is currently owned by another user” appears when i stop the game in editor.

Your error log rar is broken and I can’t tell you what you have wrong from the voice interface not loading. You’ll have to do some debugging there, this isn’t a plugin thing and is an engine issue for you.