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

<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:** [December 22, 2016, 7:45pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/431 "2016-12-22T19:45:24Z")

</div>

> [@Shanowzer;641696](#):
>
> I think I have a basic setup for LAN multiplayer done? My team is going to demo our build at SXSW so it wouldn’t need a server browser.  
> Would you mind if I posted some screenshots of what we did on networking and see if it makes sense/would work?

Yeah sure.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_601851e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_601851e1](https://forums.unrealengine.com/u/anonymous_user_601851e1)\
**Post date:** [December 22, 2016, 7:52pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/432 "2016-12-22T19:52:49Z")

</div>

is handled inside our VRCharacter blueprint

 ![HandledInCharacterBP.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/4/f4d35b809ecf1059c4c2e9559c678ee69a4f80d5.jpeg)

While is handled in the VRGameInstance

 ![In Game instance BP.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/8/680e613fa64df1ebff5b003e87ca15ecfc389401.jpeg)

My partner (the only other one with a Vive right now) went on Holiday break to visit family, so I won’t be able to test it until he gets 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:** [December 22, 2016, 8:53pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/433 "2016-12-22T20:53:48Z")

</div>

> [@Shanowzer;641703](#):
>
> is handled inside our VRCharacter blueprint
> 
> My partner (the only other one with a Vive right now) went on Holiday break to visit family, so I won’t be able to test it until he gets back.

Use the template blueprint code for switching between fps and VR pawns. It lets you test at least one side of it with a single HMD as long as you have two computers or filter it by server/client as to who uses the HMD. I checked a lot of my multiplayer tests using my wife computer before I packaged it out to friends with vives.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_601851e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_601851e1](https://forums.unrealengine.com/u/anonymous_user_601851e1)\
**Post date:** [December 22, 2016, 9:34pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/434 "2016-12-22T21:34:08Z")

</div>

So I could just plug my ethernet cable between the two computers and the one without the HMD would load in as the FPS Pawn?

---

<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:** [December 22, 2016, 10:27pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/435 "2016-12-22T22:27:00Z")

</div>

> [@Shanowzer;641757](#):
>
> So I could just plug my ethernet cable between the two computers and the one without the HMD would load in as the FPS Pawn?

On the same network yes

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_601851e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_601851e1](https://forums.unrealengine.com/u/anonymous_user_601851e1)\
**Post date:** [December 22, 2016, 10:39pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/436 "2016-12-22T22:39:27Z")

</div>

> [@;641776](#):
>
> On the same network yes

is now getting out of the area of your plugin. Thanks for the help and looking at what I had set up.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_601851e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_601851e1](https://forums.unrealengine.com/u/anonymous_user_601851e1)\
**Post date:** [December 24, 2016, 4:25am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/437 "2016-12-24T04:25:08Z")

</div>

Is there a way to have an actor get the actor/character that is gripping it?

---

<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:** [December 24, 2016, 4:09pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/438 "2016-12-24T16:09:13Z")

</div>

> [@Shanowzer;642263](#):
>
> Is there a way to have an actor get the actor/character that is gripping it?

If it has the interface there is an “OnGrip” event that is triggered that passes in the controller gripping it that could be checked for owning actor and/or stored. Otherwise no you’d have to manually check.

Its supposed to be fairly abstract as that is something that I assume the user to know how to handle best for their case and I didn’t want to force base actors.

---

<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:** [December 27, 2016, 11:01am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/439 "2016-12-27T11:01:30Z")

</div>

Merry Christmas ! Just wanted to share a quick video using your plugin. Extremely basic stuff so far but the plugin has made interactions so intuitive. Have learnt heaps so far and hoping to make a lot of progress during holiday break. Thanks again for the fantastic plugin!

[video][Espire 1: VR Operative first prototype video - Tranq gun handling - YouTube](https://youtu.be/oqR2vuOTdEA%5B/video%5D)

---

<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:** [December 27, 2016, 5:27pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/440 "2016-12-27T17:27:32Z")

</div>

Hi , I am spawning an actor on server and on the same frame I grab it with the grip motion controller. works fine on server but on client the attachment never takes place. If I add a a delay after the spawning of the actor the attachment works on clients as well. Am I doing something wrong?

---

<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:** [December 27, 2016, 5:50pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/441 "2016-12-27T17:50:12Z")

</div>

> [@UE4Hobbyist;643133](#):
>
> Hi , I am spawning an actor on server and on the same frame I grab it with the grip motion controller. works fine on server but on client the attachment never takes place. If I add a a delay after the spawning of the actor the attachment works on clients as well. Am I doing something wrong?

The client may not have the replicated object yet when you are saying that it has been gripped. Replication isn’t guaranteed to be in the order you send them in and the object has to be initialized first. is expected behavior with non attachment “grips”. The client side “GripNotify” function is probably failing due to the object not existing on the client yet.

> [@michaelwbell;643044](#):
>
> Merry Christmas ! Just wanted to share a quick video using your plugin. Extremely basic stuff so far but the plugin has made interactions so intuitive. Have learnt heaps so far and hoping to make a lot of progress during holiday break. Thanks again for the fantastic plugin!
> 
> [video][https://youtu.be/oqR2vuOTdEA[/video]](https://youtu.be/oqR2vuOTdEA%5B/video%5D)

Thats really cool, looks like you have the grip detection pretty smooth since you were cycling pretty fast there without issues.

---

<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:** [December 28, 2016, 8:34am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/443 "2016-12-28T08:34:53Z")

</div>

> [@;643139](#):
>
> The client may not have the replicated object yet when you are saying that it has been gripped. Replication isn’t guaranteed to be in the order you send them in and the object has to be initialized first. is expected behavior with non attachment “grips”. The client side “GripNotify” function is probably failing due to the object not existing on the client yet.

Just to be sure, for a game that a client can join at any time and objects are already beign held from other players I should use “attach to” instead of the VrGrip if I want them to be visible as held in that client?

---

<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:** [December 28, 2016, 5:03pm UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/444 "2016-12-28T17:03:19Z")

</div>

> [@UE4Hobbyist;643346](#):
>
> Just to be sure, for a game that a client can join at any time and objects are already beign held from other players I should use “attach to” instead of the VrGrip if I want them to be visible as held in that client?

No, if the object is already replicated my plugin checks the array of held objects when it is updated over the network and if it finds a new grip (like if connecting in) then it sets up the grip.

Your issue with instantly spawning and calling grip is that the array of gripped items is probably sent before the actual object is sent over so the client can’t actually grip anything.

_Edit_ I could technically add a flag and check held items for if they have been processed yet every frame but I think gripping after the replication is better (or spawning the object client side instead for things that don’t need to be server side, generally side arms and the like won’t need to be).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_601851e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_601851e1](https://forums.unrealengine.com/u/anonymous_user_601851e1)\
**Post date:** [December 29, 2016, 2:31am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/445 "2016-12-29T02:31:29Z")

</div>

> [@;643482](#):
>
> No, if the object is already replicated my plugin checks the array of held objects when it is updated over the network and if it finds a new grip (like if connecting in) then it sets up the grip.
> 
> Your issue with instantly spawning and calling grip is that the array of gripped items is probably sent before the actual object is sent over so the client can’t actually grip anything.
> 
> _Edit_ I could technically add a flag and check held items for if they have been processed yet every frame but I think gripping after the replication is better (or spawning the object client side instead for things that don’t need to be server side, generally side arms and the like won’t need to be).

Our client is unable to grab anything. Based on our particle effects not showing as well (particle system and light attached to our VRcharacter) Work’s otherwise tho, it tracks the players movement and controllers.

> [@UE4Hobbyist;643346](#):
>
> Just to be sure, for a game that a client can join at any time and objects are already beign held from other players I should use “attach to” instead of the VrGrip if I want them to be visible as held in that client?

Are you able to grab things client side?

either attached to your client player/spawned in the world

---

<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:** [December 29, 2016, 3:51am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/446 "2016-12-29T03:51:48Z")

</div>

> [@Shanowzer;643669](#):
>
> Our client is unable to grab anything. Based on our particle effects not showing as well (particle system and light attached to our VRcharacter) Work’s otherwise tho, it tracks the players movement and controllers.
> 
> Are you able to grab things client side?
> 
> either attached to your client player/spawned in the world

Then you aren’t grabbing things server side, check the log for errors.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_601851e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_601851e1](https://forums.unrealengine.com/u/anonymous_user_601851e1)\
**Post date:** [December 29, 2016, 3:54am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/447 "2016-12-29T03:54:38Z")

</div>

> [@;643684](#):
>
> Then you aren’t grabbing things server side, check the log for errors.

Well we’ve got it gripping server side but not client now. Progress!

Multicast something right?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_601851e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_601851e1](https://forums.unrealengine.com/u/anonymous_user_601851e1)\
**Post date:** [December 29, 2016, 4:05am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/448 "2016-12-29T04:05:09Z")

</div>

However, if I run two instances in editor and join, the client is able to pick things up.

If I package it and try to use it on another computer (testing on static ip network) it doesn’t replicate in clients view

---

<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:** [December 29, 2016, 4:07am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/449 "2016-12-29T04:07:39Z")

</div>

> [@Shanowzer;643685](#):
>
> Well we’ve got it gripping server side but not client now. Progress!
> 
> Multicast something right?

Is the object actually replicated to the client?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_601851e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_601851e1](https://forums.unrealengine.com/u/anonymous_user_601851e1)\
**Post date:** [December 29, 2016, 4:14am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/450 "2016-12-29T04:14:54Z")

</div>

It’s attached to our VrCharacter. Would it inherit replication from 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:** [December 29, 2016, 4:29am UTC](https://forums.unrealengine.com/t/vr-expansion-plugin/68709/451 "2016-12-29T04:29:33Z")

</div>

> [@Shanowzer;643692](#):
>
> It’s attached to our VrCharacter. Would it inherit replication from there?

The object has to be marked as always relevant or replicated, does the client even see the object?

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

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