# 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:** 13

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [November 16, 2016, 10:00pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/247 "2016-11-16T22:00:50Z")

</div>

> [@;624277](#):
>
> Also I’m curious, does anyone have any requests for the template? It is fairly easy to add content to it.

My personal requests:

- A bow
- Two-handed items like jars with stoppers

---

<div class="post-metadata">

**Author:** ![gausswerks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gausswerks](https://forums.unrealengine.com/u/gausswerks)\
**Post date:** [November 16, 2016, 10:40pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/248 "2016-11-16T22:40:20Z")

</div>

> [@n00854180t;624440](#):
>
> My personal requests:
> 
> - Two-handed items like jars with stoppers

Interesting thought! Have you tried prototyping anything like with the existing physics? I have just been noodling around with an old school telephone prop and with the right kind of custom collision meshes on, the two pieces of the phone behave exactly as you’d hope; you can pick up the phone base / cradle and the handset rests on top of it easily. Add on some physics constraints and cables and it behaves like a real old fashioned phone.

But I suppose you wouldn’t want the stopper just falling out if you tip the jar over. Hmm.

---

<div class="post-metadata">

**Author:** ![EspireMike](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/espiremike/32/1155389_2.png) [@EspireMike](https://forums.unrealengine.com/u/EspireMike)\
**Post date:** [November 16, 2016, 11:11pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/249 "2016-11-16T23:11:07Z")

</div>

Dear , You suggested adding an example of putting items on the player’s Hip / Pockets to the template.  
I would love to see that!

---

<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:** [November 17, 2016, 12:45am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/250 "2016-11-17T00:45:50Z")

</div>

> [@n00854180t;624440](#):
>
> My personal requests:
> 
> - A bow
> - Two-handed items like jars with stoppers

For a bow I would suggest just following epics bow guide, but throwing out the tracking code and using a Secondary Attachment from the bow hand to the draw hand when the arrow is nocked, that way the bow would rotate to follow the rear hand. It isn’t that high on the list of things I would implement since I don’t have the meshes for it and Epic already covered those bases pretty well.

Two handed jars are fairly simple, same concept as gun clips, I will likely add something of the sort fairly soon. The basic concept is easy enough, either two grippable components in an actor or two grippable actors, when the stopper hits an overlap area on/inside of the neck you ungrip it and attach it at that location with a physics weld, when gripping it again you make sure it calls un-attach on itself (OnGripped Event lets you know when to do ) and it should just function normally, if the grip is physics it should unattach itself.

_Edit_ To further clarify use the OnGripped event to get the controller holding the stopper (it is passed in through that event), when the stopper overlaps the area the stopper itself can then tell its holding controller to drop it and it can attach itself.

> [@michaelwbell;624471](#):
>
> Dear , You suggested adding an example of putting items on the player’s Hip / Pockets to the template.  
> I would love to see that!

Sure I intend to add that next, I can’t do any work tonight but it is very very easy with the VR Character as it uses my Parent Relative Attachment Component. If you want to try it yourself in the mean time just attach (or place in the character blueprint) anything you want to the parent relative attachment at the location relative to the HMD that you want it to stay. The PRAC automatically maintains the correct distance and offset for any child components to it. That is how my demo world was holding the arms at shoulder height, I just attached them to the PRAC at what felt like shoulder height and offset and then ran IK to the controllers.

> [@gausswerks;624412](#):
>
> Can’t figure out something with the drawer by interaction example. If I rotate it 180 degrees, I don’t appear to be able to pass it a linear translation that will constrain it such that it moves outward in the desired direction (-x instead of +x). -25 for the X instead of 25 doesn’t work, am I missing something?

That “Drawer” example is just an actor constraint, the correct way to do it would be as a component in an actor using a constraint component in relative space so you could rotate the actor however you like and it would work. I couldn’t for the life of me find a free domain drawer chest with separated drawers from the body, otherwise I would have already done it the “Correct” way, I intend to revisit it and if I have to mock up a desk in cad or something.

_Edit_ I am adding locking to the doors next time I get time to work on the template, but for the record it is straight forward. There is a “deny grip” boolean on the grippable static mesh component that is the door. You just set that to true and when the door is unlocked set it to false so the door can be opened.

I should be able to get some stuff implemented tomorrow, I am taking care of my newborn tonight 😛

---

<div class="post-metadata">

**Author:** ![Silpher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Silpher](https://forums.unrealengine.com/u/Silpher)\
**Post date:** [November 17, 2016, 4:43pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/251 "2016-11-17T16:43:20Z")

</div>

Hey , Great release!

Quick noob question: Does the Nvidia PhysX 3.4 update in 4.14 have any influence on your plugin?  
So would it be better to use your plugin in 4.14?

Thanks again!

Cheers.

---

<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:** [November 17, 2016, 5:01pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/252 "2016-11-17T17:01:37Z")

</div>

> [@Silpher;624835](#):
>
> Hey , Great release!
> 
> Quick noob question: Does the Nvidia PhysX 3.4 update in 4.14 have any influence on your plugin?  
> So would it be better to use your plugin in 4.14?
> 
> Thanks again!
> 
> Cheers.

Yes, considering that I am promoting (although not requiring) physics usage for VR interactions due to it being more realistic and natural the Physx update is great. Best of all having CCD available on kinematic actors now and better performance, the CCD with kinematic actors makes things like golf/pingpong or other projectile type games much better.

That being said I would suggest 4.14 for other reasons, the forward renderer and bug fixes / optimizations for VR, I consider 4.14 the first REAL VR version of the engine IMO since I was able to remove a bunch of patches and temporary fixes from my source version with 4.14.

_Edit_ Also the live GPU profiler is a godsend for VR

---

<div class="post-metadata">

**Author:** ![UE4Hobbyist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UE4Hobbyist](https://forums.unrealengine.com/u/UE4Hobbyist)\
**Post date:** [November 17, 2016, 7:09pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/253 "2016-11-17T19:09:18Z")

</div>

Thanks for the great plugin  
I have a feature suggestion in case you want it, but I does not sound easy to implement.  
A second capsule could be added in camera.  
If both the root capsule and the camera capsule collide in the environment, the push back works as it does now.  
If only the root capsule collides and the camera capsule does not (eg. player stands in front of window),the player can still move for some distance to simulate lean in. With some smart full body IK, it would look really good in multiplayer games too.

---

<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:** [November 17, 2016, 7:42pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/254 "2016-11-17T19:42:07Z")

</div>

> [@UE4Hobbyist;624910](#):
>
> Thanks for the great plugin  
> I have a feature suggestion in case you want it, but I does not sound easy to implement.  
> A second capsule could be added in camera.  
> If both the root capsule and the camera capsule collide in the environment, the push back works as it does now.  
> If only the root capsule collides and the camera capsule does not (eg. player stands in front of window),the player can still move for some distance to simulate lean in. With some smart full body IK, it would look really good in multiplayer games too.

I actually already implemented that a while ago, There were numerous issues with it and multiplayer environments that caused me to throw it away. It also introduced either the head effecting the floor finding code or throwing the head out for that and being able to clip into walls from above or below them using the head, would have taken a rather large re-write of the character movement component (even more than it is already) and trashed the efficiency of it.

With how it behaved and the fact that it would have required even more replicated variables to let the server know what is going on with the head collision during character movement I threw it out at least for now.

Its on my "Revisit " list but my secret hope is that we have chest / foot / waist trackers soon enough that it would be a waste of time.

_Edit_ With how it works currently my suggestion is having things like tables either not have collision or having inset collision. That or moving the capsule offset to -15 or more in X and accepting that heads can clip into walls slightly then and handling that if needed.

---

<div class="post-metadata">

**Author:** ![UE4Hobbyist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UE4Hobbyist](https://forums.unrealengine.com/u/UE4Hobbyist)\
**Post date:** [November 17, 2016, 9:18pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/255 "2016-11-17T21:18:40Z")

</div>

> [@;624922](#):
>
> I actually already implemented that a while ago, There were numerous issues with it and multiplayer environments that caused me to throw it away. It also introduced either the head effecting the floor finding code or throwing the head out for that and being able to clip into walls from above or below them using the head, would have taken a rather large re-write of the character movement component (even more than it is already) and trashed the efficiency of it.
> 
> With how it behaved and the fact that it would have required even more replicated variables to let the server know what is going on with the head collision during character movement I threw it out at least for now.
> 
> Its on my "Revisit " list but my secret hope is that we have chest / foot / waist trackers soon enough that it would be a waste of time.
> 
> _Edit_ With how it works currently my suggestion is having things like tables either not have collision or having inset collision. That or moving the capsule offset to -15 or more in X and accepting that heads can clip into walls slightly then and handling that if needed.

Yeah it sees like a really hard challenge. At least I can make a local solution for windows by adding invisible platforms outside of them and have the player capsule walk on them. Then I will freeze the root of the player skeletal mesh and do some IK. Not yet sure how good it will look though.

---

<div class="post-metadata">

**Author:** ![gausswerks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gausswerks](https://forums.unrealengine.com/u/gausswerks)\
**Post date:** [November 17, 2016, 10:11pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/256 "2016-11-17T22:11:11Z")

</div>

Here’s the prototype desk I have been fooling around with that you can include freely in your template, it has a main drawer and two sets of side drawers. No UVs, but they have the appropriate collision hulls. Make sure you import with auto-generate collision and one convex hull per UCX unchecked.

[https://dl.dropboxusercontent.com/u/4726438/tempdesk.zip](https://dl.dropboxusercontent.com/u/4726438/tempdesk.zip)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3d34c55e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3d34c55e](https://forums.unrealengine.com/u/anonymous_user_3d34c55e)\
**Post date:** [November 17, 2016, 10:23pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/257 "2016-11-17T22:23:56Z")

</div>

Could there be a problem with the available download? It shows as being just over 1GB, but what I actually get is only a few kb and of course doesn’t work. Could I be doing something wrong? I’m trying to download from here: [https://bitbucket.org//vrexpansionplugin/downloads](https://bitbucket.org//vrexpansionplugin/downloads)

---

<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:** [November 18, 2016, 4:00am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/258 "2016-11-18T04:00:15Z")

</div>

> [@gausswerks;625008](#):
>
> Here’s the prototype desk I have been fooling around with that you can include freely in your template, it has a main drawer and two sets of side drawers. No UVs, but they have the appropriate collision hulls. Make sure you import with auto-generate collision and one convex hull per UCX unchecked.
> 
> [https://dl.dropboxusercontent.com/u/4726438/tempdesk.zip](https://dl.dropboxusercontent.com/u/4726438/tempdesk.zip)

Thanks, that actually simplified my work tonight a lot.

I have decided to add a check box for interactive components to throw out controller rotation on grip so they behave more like the manipulation physics grip for people that don’t want to use physx constraints for all their drawers and objects. I will add that in soon.

Otherwise, minor plugin patch tonight and a bunch of your requested examples were added to the plugin template. Overview video as well for some of the behind the scenes explanations and talking about how some of it was implemented.

**Template Change Log**

```auto

**11/17/2016** - Examples

Added a potion bottle with removable stopper

Added an inventory example that can have the potion bottle attached to it.

Added a chest of physx constrained drawers (thanks gausswerks).

Finished gun interactions (see video for explanation of )

Added laser beams to the controllers

```

**Plugin Change Log**

```auto

**11/17/2016** - Feature fix

Changed order of operations for when OnGripRelease events are called so that if desired components can be set to simulate physics or not AFTER dropping in their own blueprints.
(Due to setting after calling OnGripRelease events in the prior version it would override attempts to change physics simulation states in the event).

```

Overview video

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/d/afd5653cd2a029f41946fe9e09238cb9f2f6d596.jpeg "Going over new template additions that the community asked for") ](https://www.youtube.com/watch?v=pCuRWdLsCYE)

---

<div class="post-metadata">

**Author:** ![gamereat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gamereat](https://forums.unrealengine.com/u/gamereat)\
**Post date:** [November 18, 2016, 11:10am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/259 "2016-11-18T11:10:49Z")

</div>

Hey. Just wondering does come under a MIT licences?

---

<div class="post-metadata">

**Author:** ![Resolve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Resolve](https://forums.unrealengine.com/u/Resolve)\
**Post date:** [November 18, 2016, 12:10pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/260 "2016-11-18T12:10:40Z")

</div>

Are there any plans for adding basic multiplayer to the template? A starting point would be rad, and I think it would help push the community towards making more amazing multiplayer games. Like a server browser style like Onward.

---

<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:** [November 18, 2016, 1:19pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/261 "2016-11-18T13:19:19Z")

</div>

> [@gamereat;625231](#):
>
> Hey. Just wondering does come under a MIT licences?

The plugin is under MIT yes.

> [@Resolve;625253](#):
>
> Are there any plans for adding basic multiplayer to the template? A starting point would be rad, and I think it would help push the community towards making more amazing multiplayer games. Like a server browser style like Onward.

I packaged my Advanced Sessions Plugin into the template so that I could go in and add server based multiplayer later quickly. The plugin itself is multiplayer by default but the examples will need to be modified to behave correctly. Things like the door and the like I would probably make server side movement and some of the item events will need to be server verified (the gun really is the only thing that should need major work to get going in multiplayer as I will have to spawn the projectiles on both and do collision detection on the server).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1bd46e43](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1bd46e43](https://forums.unrealengine.com/u/anonymous_user_1bd46e43)\
**Post date:** [November 18, 2016, 4:21pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/262 "2016-11-18T16:21:04Z")

</div>

How to install plugin?

Hey. Your plugin is awesome, but i’am beginner and i can’t to install it. I would very happy if you will film on youtube “How to instal plugin”:o

---

<div class="post-metadata">

**Author:** ![gausswerks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gausswerks](https://forums.unrealengine.com/u/gausswerks)\
**Post date:** [November 18, 2016, 5:21pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/264 "2016-11-18T17:21:15Z")

</div>

> [@Dmitrsta;625351](#):
>
> Hey. Your plugin is awesome, but i’am beginner and i can’t to install it. I would very happy if you will film on youtube “How to instal plugin”:o

That’s why he put in the template. Download it, put it in your unreal projects folder, either open up the editor and load the project or just double click on the project file. If you don’t have Visual Studio installed, the editor will helpfully prompt you to download it, so that you can compile the plugin.

---

<div class="post-metadata">

**Author:** ![gausswerks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gausswerks](https://forums.unrealengine.com/u/gausswerks)\
**Post date:** [November 18, 2016, 5:46pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/265 "2016-11-18T17:46:12Z")

</div>

Everything looks cool, it is instructive to see the desk the way you would handle it. I had gotten the drawers in physically constrained but somehow not as cleanly, whenever I added the drawers as components for some reason the interaction wasn’t clean, very weird and buggy despite the same constraint settings. I must have missed a setting.

Looking forward to the interaction style version of the drawers because you may have noticed that the drawers don’t quite hold up as physics constraints. Or rather, they behave a little too much like the real thing–if you slam them close hard enough, they’ll clip through a little and get stuck in the desk.

---

<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:** [November 18, 2016, 6:08pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/266 "2016-11-18T18:08:29Z")

</div>

> [@gausswerks;625409](#):
>
> Everything looks cool, it is instructive to see the desk the way you would handle it. I had gotten the drawers in physically constrained but somehow not as cleanly, whenever I added the drawers as components for some reason the interaction wasn’t clean, very weird and buggy despite the same constraint settings. I must have missed a setting.
> 
> Looking forward to the interaction style version of the drawers because you may have noticed that the drawers don’t quite hold up as physics constraints. Or rather, they behave a little too much like the real thing–if you slam them close hard enough, they’ll clip through a little and get stuck in the desk.

They shouldn’t, if the version I made is doing that then I need to tweak it a little. But regardless drawers are one of the few interactive things that I think would be better off NOT using physics with. Its not required for their interaction so is unduly expensive and would be simpler to do with normal movement limitations in the first place.

weekend i’ll be adding the rotationless option to the interactive settings which will pretty much solve that.

_Edit_ Actually if you were talking about your implementation getting stuck I would suggest looking at the construction script of the ones I made last night. I set some variables that aren’t accessible just as fields on the constraint in there so that the physics constraint doesn’t allow for any backwards movement. By default constraints allow the set distance both forward AND backward and that may have been causing your drawer clipping issue.

---

<div class="post-metadata">

**Author:** ![gausswerks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gausswerks](https://forums.unrealengine.com/u/gausswerks)\
**Post date:** [November 18, 2016, 7:30pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/267 "2016-11-18T19:30:06Z")

</div>

> [@;625424](#):
>
> They shouldn’t, if the version I made is doing that then I need to tweak it a little. But regardless drawers are one of the few interactive things that I think would be better off NOT using physics with. Its not required for their interaction so is unduly expensive and would be simpler to do with normal movement limitations in the first place.
> 
> weekend i’ll be adding the rotationless option to the interactive settings which will pretty much solve that.
> 
> _Edit_ Actually if you were talking about your implementation getting stuck I would suggest looking at the construction script of the ones I made last night. I set some variables that aren’t accessible just as fields on the constraint in there so that the physics constraint doesn’t allow for any backwards movement. By default constraints allow the set distance both forward AND backward and that may have been causing your drawer clipping issue.

It happens with both mine and yours. With a drawer at full open, slamming it shut as hard as you can will usually clip the front of the drawer past where it should. Sometimes you can fish it out again, sometimes not. But yes, moot point, we certainly don’t need or want a bunch of physics for a simple drawer. All that aside it does work well. I tried loading the drawer with a bunch of smaller boxes, thrashed it around, everything behaves quite nicely except for the high speed closing glitch as described.

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

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