# VR Expansion Plugin

**URL:** <https://forums.unrealengine.com/t/vr-expansion-plugin/68709>\
**Category:** XR Development\
**Tags:** unreal-engine\
**Created:** [July 11, 2016, 6:16pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709 "2016-07-11T18:16:57Z")\
**Posts on this page:** 20\
**Page:** 205

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 6, 2020, 12:52pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4182 "2020-07-06T12:52:25Z")

</div>

> [@thelazylion](#):
>
> I reverted back so I’m not sure i can get that specific crash again… I’ll let you know if I run into it again… For now I have duct taped a solution together… Works fairly well for now… Will let you know if anything else comes up…
> 
> Going back to melee weaponry…  
> Wanted your opinion on how you would handle weapon gripping on NPC’s… Since they shared the same character base as the vr character on our project, would it be viable to let them artificially use the inherited motion controllers attached to their hands, to “grip” their weapons, therefore allowing the player to parry their swords/melee weapons around…
> 
> However I was thinking the weapon would be gripped to the Hand, but the IK of the hand would also have to grip and follow the sword’s movement as it gets pushed around by the player, would cause an infinite loop between the two moving each other I’m guessing…
> 
> Was there a better way to handle ? I couldn’t find too much useful info on how Blade n Sorcery handled it on their end… The default way would be just to attach the object to their hand and set physics on, but it doesn’t sound like it would let the player push the enemies blade around.
> 
> Any info is always helpful and appreciated 🙂

Use the physical animation component in your NPCs, and use two physics constraints with hard settings (not soft) to lock the palms to the weapon at the correct locations. Pushing against the blade would push the physical arm back as well then, same goes for if you wanted physical arms for the player as well, it would be best to throw out the custom grip logic and go hard constraints and manage the constraints on the arm bodies instead.

You can just “attach” if you are using one handed with welding enabled and that would work as well, but constriants will let you be more flexible going forward.

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 6, 2020, 1:00pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4183 "2020-07-06T13:00:19Z")

</div>

> [@3agle](#):
>
> Hi all,  
> may very well have been covered before in thread but it is very long and I haven’t been able to search for it effectively, so I apologize if it has been covered.
> 
> I’ve encountered plugin in a project I’m working on (I didn’t implement), and I am experiencing a problem with HMD position replicating across the network ( functions fine), causing the local position to jitter at high ping. I am under the impression from some of the code paths in UReplicatedVRCameraComponent that the sending client should not use replicated values, yet that does appear to be happening (the higher the ping the more jitter when laterally moving the headset). Turning off replication on the component results in no lateral movement of the HMD in the world. Is expected behaviour for the plugin? I would have expected the local player would always update using the transform given by the HMD. Could it be that there is some sort of authoritative HMD position flag somewhere?
> 
> Also the code is based on plugin version 4.22 and there have been modifications to it within the project, so fully willing to accept that is not a plugin issue, I just want to establish what the plugin \*should \*be doing, if possible.

Turning off replication will not effect the local movement of the HMD normally no, it sounds like your client somehow set it up so that the player is not fully possessing the pawn and is receiving camera replication on the camera they are using for their local view. The clients send their local camera transform out to the server via RPC and it is returned back to all (non owning) clients via a replicated variable.

Not entirely sure how that could happen, it would take some effort to break it as much as that. Its possible that they removed the Cond\_SkipOwner part of the replicated variable?  
I still have users in multiplayer in 4.22 so it is highly unlikely that a feature back port broke any of that (still possible, just very unlikely).

The camera updates its local position on GetCameraView, which should set later in the frame than replication, so the mostly likely outcome is some sort of setup where they aren’t fully controlling their pawn somehow.

---

<div class="post-metadata">

**Author:** ![CokeKuma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CokeKuma](https://forums.unrealengine.com/u/CokeKuma)\
**Post date:** [July 6, 2020, 1:00pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4184 "2020-07-06T13:00:53Z")

</div>

hi. morendetral.  
I am currently modifying the climbing logic a bit and I have a question to ask.  
Climbing actor was implemented through on grip and on grip release event, but when climbing mode is applied through on grip, there is no collision reaction with climbing actor.  
Are there any variables that can change setting?

Climbing actor used “grip type - events only” to make use of only the necessary gripping events.

---

<div class="post-metadata">

**Author:** ![3agle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3agle](https://forums.unrealengine.com/u/3agle)\
**Post date:** [July 6, 2020, 2:19pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4185 "2020-07-06T14:19:01Z")

</div>

> [@](#):
>
> Turning off replication will not effect the local movement of the HMD normally no, it sounds like your client somehow set it up so that the player is not fully possessing the pawn and is receiving camera replication on the camera they are using for their local view. The clients send their local camera transform out to the server via RPC and it is returned back to all (non owning) clients via a replicated variable.
> 
> Not entirely sure how that could happen, it would take some effort to break it as much as that. Its possible that they removed the Cond\_SkipOwner part of the replicated variable?  
> I still have users in multiplayer in 4.22 so it is highly unlikely that a feature back port broke any of that (still possible, just very unlikely).
> 
> The camera updates its local position on GetCameraView, which should set later in the frame than replication, so the mostly likely outcome is some sort of setup where they aren’t fully controlling their pawn somehow.

Fantastic, thank you for the information. No doubt it is something that is broken in the project, will help greatly with the search 🙂

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 6, 2020, 4:19pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4186 "2020-07-06T16:19:06Z")

</div>

> [@CokeKuma](#):
>
> hi. morendetral.  
> I am currently modifying the climbing logic a bit and I have a question to ask.  
> Climbing actor was implemented through on grip and on grip release event, but when climbing mode is applied through on grip, there is no collision reaction with climbing actor.  
> Are there any variables that can change setting?
> 
> Climbing actor used “grip type - events only” to make use of only the necessary gripping events.

I set MoveIgnoreActor on actor grips so that pushing them into the body doesn’t stop the pawn from moving. You can either delete the entry again by calling MoveIgnoreActors.remove the actor, or grip a component inside of your climbing actor instead.

I will also change the source so that event only grips don’t do that step, it was an oversight on my part that they are.

_Edit_ Changed to no longer ignore movement on events only in 4.24+

---

<div class="post-metadata">

**Author:** ![thelazylion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thelazylion](https://forums.unrealengine.com/u/thelazylion)\
**Post date:** [July 6, 2020, 7:26pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4187 "2020-07-06T19:26:37Z")

</div>

> [@](#):
>
> Use the physical animation component in your NPCs, and use two physics constraints with hard settings (not soft) to lock the palms to the weapon at the correct locations. Pushing against the blade would push the physical arm back as well then, same goes for if you wanted physical arms for the player as well, it would be best to throw out the custom grip logic and go hard constraints and manage the constraints on the arm bodies instead.
> 
> You can just “attach” if you are using one handed with welding enabled and that would work as well, but constriants will let you be more flexible going forward.

That sounds perfectly viable, I’ll give that a try using two constraints… Thanks again…

---

<div class="post-metadata">

**Author:** ![CokeKuma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CokeKuma](https://forums.unrealengine.com/u/CokeKuma)\
**Post date:** [July 7, 2020, 1:19am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4188 "2020-07-07T01:19:32Z")

</div>

> [@](#):
>
> I set MoveIgnoreActor on actor grips so that pushing them into the body doesn’t stop the pawn from moving. You can either delete the entry again by calling MoveIgnoreActors.remove the actor, or grip a component inside of your climbing actor instead.
> 
> I will also change the source so that event only grips don’t do that step, it was an oversight on my part that they are.
> 
> _Edit_ Changed to no longer ignore movement on events only in 4.24+

Thank you for your answer. I am using version 4.25.  
The notifygrip and Drop\_Implementation function still have the part that handles MoveIgnoreActors.

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 7, 2020, 3:02am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4189 "2020-07-07T03:02:02Z")

</div>

> [@CokeKuma](#):
>
> Thank you for your answer. I am using version 4.25.  
> The notifygrip and Drop\_Implementation function still have the part that handles MoveIgnoreActors.

You have to update, I changed it after replying to your post to skip that step for event only grips.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3eafe957](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3eafe957](https://forums.unrealengine.com/u/anonymous_user_3eafe957)\
**Post date:** [July 8, 2020, 9:21pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4190 "2020-07-08T21:21:06Z")

</div>

Whenever i grip something with the grasping hands, the hanbds phase through the level geometry. Is there a way to make the hands count as collision for the gripped object. IE them getting blocked on the level along with the held object?

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 9, 2020, 12:17am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4191 "2020-07-09T00:17:28Z")

</div>

> [@NebulyDev](#):
>
> Whenever i grip something with the grasping hands, the hanbds phase through the level geometry. Is there a way to make the hands count as collision for the gripped object. IE them getting blocked on the level along with the held object?

In the SetupPhysicsIfNeeded function you would want to make the DisablePhysics node enable instead. You would also likely want to them setup the welded body driver on the non simulating hands as well as I am not since they weren’t colliding.

---

<div class="post-metadata">

**Author:** ![The\_VoiD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_VoiD](https://forums.unrealengine.com/u/The_VoiD)\
**Post date:** [July 9, 2020, 9:15am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4192 "2020-07-09T09:15:12Z")

</div>

Hello .  
I wanted to implement plugin to my project. But I’m using the source version of 4.24 and already added the missing brackets in the sourcecode so the vr hands are not offsetted anymore. Will interfere with the plugin? Thx in regards!

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 9, 2020, 12:06pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4193 "2020-07-09T12:06:06Z")

</div>

> [@The\_VoiD](#):
>
> Hello .  
> I wanted to implement plugin to my project. But I’m using the source version of 4.24 and already added the missing brackets in the sourcecode so the vr hands are not offsetted anymore. Will interfere with the plugin? Thx in regards!

Not entirely sure what you are talking about, but generally no, the plugin source is mostly standalone regarding motion controllers.

---

<div class="post-metadata">

**Author:** ![The\_VoiD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_VoiD](https://forums.unrealengine.com/u/The_VoiD)\
**Post date:** [July 9, 2020, 3:42pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4194 "2020-07-09T15:42:14Z")

</div>

Ue4.24.3 has a bug where the motion controllers position are offsetted by something around meter on the x axis.(forward) The solution that epic suggested was to download the source version of the engine and add 2 missing brackets in the source code. That fixed the bug. But since your plugin is working without problems in version i thought that maybe you worked around bug inside the blueprints.

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 9, 2020, 3:44pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4195 "2020-07-09T15:44:28Z")

</div>

> [@The\_VoiD](#):
>
> Ue4.24.3 has a bug where the motion controllers position are offsetted by something around meter on the x axis.(forward) The solution that epic suggested was to download the source version of the engine and add 2 missing brackets in the source code. That fixed the bug. But since your plugin is working without problems in version i thought that maybe you worked around bug inside the blueprints.

I don’t use their controllers, I use my own subclasses. I was aware of a ResetOrientationAndPosition issue with the steam input module but it should be fixed in 4.24.3, where did they have you add brackets that they were missing?

---

<div class="post-metadata">

**Author:** ![The\_VoiD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_VoiD](https://forums.unrealengine.com/u/The_VoiD)\
**Post date:** [July 9, 2020, 4:15pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4196 "2020-07-09T16:15:04Z")

</div>

No they didn’t and also the vive trackpads broke. -.-  
Oh my bad, they also forgot the “else”.  
The lines you have to change are around 178.

Quote: [https://forums.unrealengine.com/deve…he-wrong-place](https://forums.unrealengine.com/development-discussion/vr-ar-development/1716839-motion-controllers-in-the-wrong-place)

is the official latest from Epic:  
We’ve found a fix for the bug that you should be able to cherry-pick onto a source build of the engine:

Open the source file Engine\Plugins\Runtime\Steam\SteamVR\Source\SteamVRInputDevice\Private\SteamVRInputDevice.cpp

In the function FSteamVRInputDevice::Tick look for the following two lines at the end of the function:

1. CachedBaseOrientation = FQuat::Identity;
2. CachedBasePosition = FVector::ZeroVector;

Change those lines to:

1. else
2. {
3. CachedBaseOrientation = FQuat::Identity;
4. CachedBasePosition = FVector::ZeroVector;
5. }

That should resolve the issue.

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 9, 2020, 4:46pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4197 "2020-07-09T16:46:24Z")

</div>

> [@The\_VoiD](#):
>
> No they didn’t and also the vive trackpads broke. -.-  
> Oh my bad, they also forgot the “else”.  
> The lines you have to change are around 178.

Ah, no that should also be in effect in my plugin, its a problem with the new input module for steamvr.

However it would only come into effect when resetting Orientation and position, and I do not do that in my template as its fully roomscale. That is the bug I was talking about in my earlier post.

---

<div class="post-metadata">

**Author:** ![Nathanielbbb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nathanielbbb](https://forums.unrealengine.com/u/Nathanielbbb)\
**Post date:** [July 9, 2020, 11:17pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4198 "2020-07-09T23:17:24Z")

</div>

Hello, I found an interesting document on how the walking dead implemented stabbing and the variable force required during the stab and the withdraw with the use of curves. [https://www.unrealengine.com/en-US/t…saints-sinners](https://www.unrealengine.com/en-US/tech-blog/skydance-interactive-shows-how-it-injected-vr-physicality-and-melee-combat-in-the-walking-dead-saints-sinners). Would anyone have any suggestions on implementing into the melee script?

---

<div class="post-metadata">

**Author:** ![The\_VoiD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_VoiD](https://forums.unrealengine.com/u/The_VoiD)\
**Post date:** [July 10, 2020, 8:50am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4201 "2020-07-10T08:50:20Z")

</div>

Ok, i make a seated game and i reset the location and rotation on begin play. And also via action buttons.  
i tried to add the plugin to my project. It builded one and ignored one. Also when i now opening my project now the hand offset bug is back.

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 10, 2020, 12:19pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4202 "2020-07-10T12:19:03Z")

</div>

> [@Nathanielbbb](#):
>
> Hello, I found an interesting document on how the walking dead implemented stabbing and the variable force required during the stab and the withdraw with the use of curves. [https://www.unrealengine.com/en-US/t…saints-sinners](https://www.unrealengine.com/en-US/tech-blog/skydance-interactive-shows-how-it-injected-vr-physicality-and-melee-combat-in-the-walking-dead-saints-sinners). Would anyone have any suggestions on implementing into the melee script?

You could do that by variable constraint forces on the stab, they faked a lot of the physics of their interactions which you could do as well. But as is with how it is setup now, you could make the initial penetration just slightly into the spot with a strong force, then sample the constraint impulse against your threshold to decide whether to relax it (let it breach in) or not by setting a new constraint stiffness / damping and offsetting the local pose to be inside the object more.

You can do all of it in BP post the penetration detection, which is why that part was left out of the script itself in the first place, for customization.

---

<div class="post-metadata">

**Author:** ![mordentral](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mordentral](https://forums.unrealengine.com/u/mordentral)\
**Post date:** [July 10, 2020, 12:20pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/4203 "2020-07-10T12:20:08Z")

</div>

> [@The\_VoiD](#):
>
> Ok, i make a seated game and i reset the location and rotation on begin play. And also via action buttons.  
> i tried to add the plugin to my project. It builded one and ignored one. Also when i now opening my project now the hand offset bug is back.

As I told you, the bug being in the base engine source, my plugin is also going to suffer from it.

[Previous page](https://forums.unrealengine.com/t/vr-expansion-plugin/68709.md?page=204)

[Next page](https://forums.unrealengine.com/t/vr-expansion-plugin/68709.md?page=206)
