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

<div class="post-metadata">

**Author:** ![anonymous\_user\_650f1d25](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_650f1d25](https://forums.unrealengine.com/u/anonymous_user_650f1d25)\
**Post date:** [September 15, 2017, 1:42am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1540 "2017-09-15T01:42:03Z")

</div>

> [@](#):
>
> I don’t actually attach anything and the gripping isn’t based off of the hand mesh, it is based off of the controller itself. Unless you actually flipped the scaling on the controller instead of the mesh you aren’t running into problems with that.

Sheit, I apologize for wasting your time! You’re right, I wasn’t flipping the motion controller scale.  
You actually told me you’re parenting it to the controller itself before, but I forgot…

> [@](#):
>
> ```auto
> 
> VRGripLP
> VRGripRP
> 
> ```
> 
> LeftPrimary / RightPrimary
> 
> You can go in to the “GetCorrectPrimarySlotPrefix” function and change those if you wish, it really should be in a variable somewhere instead, but not the largest deal.

Awesome thanks a lot. Yep, changing it myself is no problem at all. Thanks.

Jsyk, I actually searched the whole thread for “VRGrip” and didn’t get any VRGripRP/LP hits. Checked out Bitbucket VRGrip Interface section too, but didn’t see it there.

---

<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:** [September 15, 2017, 2:28am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1541 "2017-09-15T02:28:35Z")

</div>

> [@anonymous\_user\_650f1d25](#):
>
> Sheit, I apologize for wasting your time! You’re right, I wasn’t flipping the motion controller scale.  
> You actually told me you’re parenting it to the controller itself before, but I forgot…
> 
> Awesome thanks a lot. Yep, changing it myself is no problem at all. Thanks.
> 
> Jsyk, I actually searched the whole thread for “VRGrip” and didn’t get any VRGripRP/LP hits. Checked out Bitbucket VRGrip Interface section too, but didn’t see it there.

Its a template thing, not a plugin thing, I generally don’t list template stuff on the wiki for the plugin as they aren’t officially part of it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_650f1d25](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_650f1d25](https://forums.unrealengine.com/u/anonymous_user_650f1d25)\
**Post date:** [September 15, 2017, 3:44am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1542 "2017-09-15T03:44:41Z")

</div>

> [@](#):
>
> Its a template thing, not a plugin thing, I generally don’t list template stuff on the wiki for the plugin as they aren’t officially part of it.

## Damnit, sorry. I forgot I was using the (a hacked) template character.

Having hooked it up, unless I grab the object close to the socket it’ll just parent it to the controller with the offset.  
Was it always like that? I thought if the mesh has the right-named socket it would always snap to the socket regardless of where the mesh is grabbed.

Edit:  
I found that Closest Primary Slot in Range’s “Had Slot in Range” was returning false most of the time. Unless the grab sphere was almost perfectly encapsulating the socket it would return false. Looked for a range variable, in hopes of increasing the range, with no luck so instead just removed that check altogether.

Now it’s easier to grab stuff and have it snap to the socket, but if I grab an object such that the grabsphere is barely touching it, the mesh’ll launch in the direction of the socket without attaching. lol

---

<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:** [September 15, 2017, 12:46pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1543 "2017-09-15T12:46:09Z")

</div>

> [@](#):
>
> ## Damnit, sorry. I forgot I was using the (a hacked) template character.
> 
> Having hooked it up, unless I grab the object close to the socket it’ll just parent it to the controller with the offset.  
> Was it always like that? I thought if the mesh has the right-named socket it would always snap to the socket regardless of where the mesh is grabbed.
> 
> Edit:  
> I found that Closest Primary Slot in Range’s “Had Slot in Range” was returning false most of the time. Unless the grab sphere was almost perfectly encapsulating the socket it would return false. Looked for a range variable, in hopes of increasing the range, with no luck so instead just removed that check altogether.
> 
> Now it’s easier to grab stuff and have it snap to the socket, but if I grab an object such that the grabsphere is barely touching it, the mesh’ll launch in the direction of the socket without attaching. lol

There is a grab range variable, its in local space to the socket so object scale effects it, you can either up the range, or override the HadSocketInRange function in the object itself and always return true and one of the sockets.

You also likely have auto drop distance very low if it is dropping right after being picked up.

Is your object scaled very small from default?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2d9555231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2d9555231](https://forums.unrealengine.com/u/anonymous_user_2d9555231)\
**Post date:** [September 15, 2017, 11:44pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1544 "2017-09-15T23:44:16Z")

</div>

Hello! First of all I would like to thank you for the plugin.

Im somewhat new to vr and I have two very basic questions:

If I just want the Navigate Movement for my pawn, which section of the blueprints i have to copy?

and the second one:

When I use the VrVehicle wich event would I use to start a Matine for an automatic Ride?

---

<div class="post-metadata">

**Author:** ![kusogaki77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kusogaki77](https://forums.unrealengine.com/u/kusogaki77)\
**Post date:** [September 16, 2017, 12:41am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1545 "2017-09-16T00:41:12Z")

</div>

> [@](#):
>
> Is your object scaled very small from default?

Cool thanks a lot for the superfast reply and info! I didn’t know scale affects it. Awesome!  
I’ll look around for the grab range and auto drop distance vars. They were all left at default.

The original mesh, unscaled, is a sphere a little bit smaller than the size of a volleyball.  
I’m seeing the issue about 20% of the time when it’s scaled down to half (xyz .5; size of a wiffle ball),  
and 90% of the time when it’s scaled to about a quarter of original size (xyz .25ish; size of a golfball).  
I’m away from work so can’t give exact values.

I could easily just import each of those meshes pre-scaled.

Would you recommend it’s best not to muck with scale in UE4, outside of the mesh scale functionality you added to VRGrippables a while 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:** [September 16, 2017, 12:52am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1546 "2017-09-16T00:52:11Z")

</div>

> [@kusogaki77](#):
>
> Cool thanks a lot for the superfast reply and info! I didn’t know scale affects it. Awesome!  
> I’ll look around for the grab range and auto drop distance vars. They were all left at default.
> 
> The original mesh, unscaled, is a sphere a little bit smaller than the size of a volleyball.  
> I’m seeing the issue about 20% of the time when it’s scaled down to half (xyz .5; size of a wiffle ball),  
> and 90% of the time when it’s scaled to about a quarter of original size (xyz .25ish; size of a golfball).
> 
> I could easily just import each of those meshes pre-scaled.  
> I’m away from work so can’t give exact values.

its in local space so that if the object is 10x normal size you don’t have to grip right as the center to grab there and if it is 0.1 size then it isn’t larger than the object itself.

You can just set the range waaaay larger, override the HasSocketInRange function, or pre-scale the object like you said.

It used to be in world space for the radius but it proved better to do it way for the reasons above.

If you set the radius to the size of the object itself then it should work though.

---

<div class="post-metadata">

**Author:** ![Dealman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dealman](https://forums.unrealengine.com/u/Dealman)\
**Post date:** [September 16, 2017, 11:17pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1547 "2017-09-16T23:17:28Z")

</div>

Just started playing around with plugin a bit using your template, looks very promising. I’m having a rather peculiar issue however, I added my own actor - a sword, just a simple grippable one. I can grab it just fine and swing it around - but after a few seconds, maybe 4-5 seconds it just disappears.

Am I missing something?

Also a pretty odd question, but what do you find to be the most convenient method of developing for the VR? I’ve got the deluxe audio strap, but it’s still quite a bother having to take the headset on and off every few minutes. I’m scared resting it on my forehead will mess up the lenses 😛

---

<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:** [September 17, 2017, 12:10am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1548 "2017-09-17T00:10:34Z")

</div>

> [@Dealman](#):
>
> Just started playing around with plugin a bit using your template, looks very promising. I’m having a rather peculiar issue however, I added my own actor - a sword, just a simple grippable one. I can grab it just fine and swing it around - but after a few seconds, maybe 4-5 seconds it just disappears.
> 
> Am I missing something?
> 
> Also a pretty odd question, but what do you find to be the most convenient method of developing for the VR? I’ve got the deluxe audio strap, but it’s still quite a bother having to take the headset on and off every few minutes. I’m scared resting it on my forehead will mess up the lenses 😛

I have never seen the first thing… no idea what is happening there, have you tried debugging it to see what it does?

For the second thing, I tend to dev in 2d, test in VR. Have it set in the template to always be a 2d test pawn unless I launch in vr preview.

---

<div class="post-metadata">

**Author:** ![vaanrose](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vaanrose](https://forums.unrealengine.com/u/vaanrose)\
**Post date:** [September 17, 2017, 5:41am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1549 "2017-09-17T05:41:29Z")

</div>

Hey Mordental,

I just found plugin while looking for help setting up collision on a VR pawn. Looks amazing. But it appears the template you have up for download is for 4.17 (even though the description says its for 4.16), and I was wondering if you still have the 4.16 version available somewhere? My school’s VR lab hasn’t updated to 4.17 yet, and I’d love to play around with .

---

<div class="post-metadata">

**Author:** ![Dealman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dealman](https://forums.unrealengine.com/u/Dealman)\
**Post date:** [September 17, 2017, 1:28pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1550 "2017-09-17T13:28:02Z")

</div>

> [@](#):
>
> I have never seen the first thing… no idea what is happening there, have you tried debugging it to see what it does?
> 
> For the second thing, I tend to dev in 2d, test in VR. Have it set in the template to always be a 2d test pawn unless I launch in vr preview.

Not quite sure either, just tried importing another mesh and it does the exact same thing. 4-5 seconds after gripping it - it disappears. time I imported a simple weapon mesh and modified the GunBase. Will do some debugging later and see if I can figure out why.

Are there any plans to add support for grippable poseable meshes? I reckon using a poseable would be a convenient way of managing various parts of a rifle(pulling the bolt etc) since you can easily manipulate bones with component. A bit cleaner than having to use separate meshes.

---

<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:** [September 17, 2017, 2:25pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1551 "2017-09-17T14:25:21Z")

</div>

> [@Dealman](#):
>
> Not quite sure either, just tried importing another mesh and it does the exact same thing. 4-5 seconds after gripping it - it disappears. time I imported a simple weapon mesh and modified the GunBase. Will do some debugging later and see if I can figure out why.
> 
> Are there any plans to add support for grippable poseable meshes? I reckon using a poseable would be a convenient way of managing various parts of a rifle(pulling the bolt etc) since you can easily manipulate bones with component. A bit cleaner than having to use separate meshes.

You can drive a poseable mesh off of one of the grippable sphere / box / cylinder components, ends up cleaner as otherwise you are going to be looking for overlap with bones on grip and gripping specific bones on the same mesh. Using these invisible components not only lets you define specific collision sizes for the grip, but also run additional logic easier.

Seperate meshes aren’t required, just pulling a % of travel off of the range it is allowed and driving a bone or animation off of it works fine.

Its also difficult to make something generic enough with defining grips on specific bones which may be chained so that it works for all uses, it is far easier way.

Anything super specific like following a spline can be done with a CustomGrip type anyway (though I think I will be adding a spline follower component soon).

_Edit_ Or were you talking about making a custom grippable actor with a poseable mesh base so that it is easier? Because that is a valid point if so since they are only components in engine by default.

---

<div class="post-metadata">

**Author:** ![Dealman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dealman](https://forums.unrealengine.com/u/Dealman)\
**Post date:** [September 17, 2017, 3:22pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1552 "2017-09-17T15:22:17Z")

</div>

> [@](#):
>
> You can drive a poseable mesh off of one of the grippable sphere / box / cylinder components, ends up cleaner as otherwise you are going to be looking for overlap with bones on grip and gripping specific bones on the same mesh. Using these invisible components not only lets you define specific collision sizes for the grip, but also run additional logic easier.
> 
> Seperate meshes aren’t required, just pulling a % of travel off of the range it is allowed and driving a bone or animation off of it works fine.
> 
> Its also difficult to make something generic enough with defining grips on specific bones which may be chained so that it works for all uses, it is far easier way.
> 
> Anything super specific like following a spline can be done with a CustomGrip type anyway (though I think I will be adding a spline follower component soon).
> 
> _Edit_ Or were you talking about making a custom grippable actor with a poseable mesh base so that it is easier? Because that is a valid point if so since they are only components in engine by default.

Aye, that’s what I meant but the former should definitely work as well. Will just have to experiment a bit, I’m so used to using poseable meshes as of lately as animating isn’t really my thing, whenever I fiddle with animations I break stuff. :rolleyes: But simple stuff such as moving a bolt back and forth shouldn’t be any issues.

I do like how you’ve set up the gun, that it eliminates minor erratic movement so you get a smoother experience. A lot of VR games with weapons fail to do and just forget the fact that you get majority of your stability by pushing the rifle up against your shoulder. Great job!

---

<div class="post-metadata">

**Author:** ![J\_Tox](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/j_tox/32/1040506_2.png) [@J\_Tox](https://forums.unrealengine.com/u/J_Tox)\
**Post date:** [September 18, 2017, 6:35am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1553 "2017-09-18T06:35:10Z")

</div>

Hi mordental,  
First thanks for you plugin which is a big help to become friend with VR in UE4.  
I am using your VivePawn Character from your Template in my Map and I have a User Widget with a ScrollBox (with horizontal orientation) and I remark that the Laser Pointer can’t interact with the scroll bar.  
Do you have any idea why the laser pointer is not working with?  
Thanks for any help.🙂

---

<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:** [September 18, 2017, 12:53pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1554 "2017-09-18T12:53:37Z")

</div>

> [@JFHTX](#):
>
> Hi mordental,  
> First thanks for you plugin which is a big help to become friend with VR in UE4.  
> I am using your VivePawn Character from your Template in my Map and I have a User Widget with a ScrollBox (with horizontal orientation) and I remark that the Laser Pointer can’t interact with the scroll bar.  
> Do you have any idea why the laser pointer is not working with?  
> Thanks for any help.🙂

Are you in 4.16? Scroll bars were broken in 4.16 and fixed in 4.17

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-46447)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

If you are locked to 4.16 you can pull the source of the 4.17 version and use it in 4.16 just fine I believe.

---

<div class="post-metadata">

**Author:** ![J\_Tox](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/j_tox/32/1040506_2.png) [@J\_Tox](https://forums.unrealengine.com/u/J_Tox)\
**Post date:** [September 18, 2017, 2:11pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1555 "2017-09-18T14:11:53Z")

</div>

> [@JFHTX](#):
>
> Hi mordental,  
> First thanks for you plugin which is a big help to become friend with VR in UE4.  
> I am using your VivePawn Character from your Template in my Map and I have a User Widget with a ScrollBox (with horizontal orientation) and I remark that the Laser Pointer can’t interact with the scroll bar.  
> Do you have any idea why the laser pointer is not working with?  
> Thanks for any help.🙂

I’m working with 4.17.1 and your plugin version 4.17.  
I have the same issue as mentioned above :  
Result: The Scroll box cannot be scrolled by clicking and dragging the scroll bar  
Expected: The scroll box in the widget component would be able to be scrolled by clicking and dragging the scroll bar  
I will do some checking again.

---

<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:** [September 18, 2017, 3:00pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1556 "2017-09-18T15:00:52Z")

</div>

> [@JFHTX](#):
>
> I’m working with 4.17.1 and your plugin version 4.17.  
> I have the same issue as mentioned above :  
> Result: The Scroll box cannot be scrolled by clicking and dragging the scroll bar  
> Expected: The scroll box in the widget component would be able to be scrolled by clicking and dragging the scroll bar  
> I will do some checking again.

Well the widget interaction component isn’t mine, its part of the engine. If there is an interaction bug with it (outside of my implementation), then it should be reported to epic.

Currently it defaults to mouseL held on press and released on release for how it works.

---

<div class="post-metadata">

**Author:** ![J\_Tox](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/j_tox/32/1040506_2.png) [@J\_Tox](https://forums.unrealengine.com/u/J_Tox)\
**Post date:** [September 18, 2017, 3:11pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1557 "2017-09-18T15:11:50Z")

</div>

> [@](#):
>
> Well the widget interaction component isn’t mine, its part of the engine. If there is an interaction bug with it (outside of my implementation), then it should be reported to epic.
> 
> Currently it defaults to mouseL held on press and released on release for how it works.

Thank you, I will check for that.

---

<div class="post-metadata">

**Author:** ![duyth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duyth](https://forums.unrealengine.com/u/duyth)\
**Post date:** [September 18, 2017, 10:16pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1558 "2017-09-18T22:16:52Z")

</div>

Cool plugin.  
I m playing around with a top down concept with quite a few AI pawns and wondering what the best approach to grip / pick up these pawns that wouldnt affect performance much.  
From what I see, the standard VR grip requires pickupable objects to stimulate physics but not sure if it is a good idea in scenario.  
thank you

---

<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:** [September 18, 2017, 10:49pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/1559 "2017-09-18T22:49:18Z")

</div>

> [@duyth](#):
>
> Cool plugin.  
> I m playing around with a top down concept with quite a few AI pawns and wondering what the best approach to grip / pick up these pawns that wouldnt affect performance much.  
> From what I see, the standard VR grip requires pickupable objects to stimulate physics but not sure if it is a good idea in scenario.  
> thank you

There are like (8?) grip types now, only the “interactive with physics” types require simulation, the rest directly move the held object instead and should function fine assuming that you don’t run their own movement on themselves during the grip.

Use PhysicsOnly, it just sets their transform every frame to match the desired controller offset.

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

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