# VR Content Examples

**URL:** <https://forums.unrealengine.com/t/vr-content-examples/64140>\
**Category:** XR Development\
**Tags:** unreal-engine\
**Created:** [May 18, 2016, 5:12am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140 "2016-05-18T05:12:30Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![anonymous\_user\_b255ac231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b255ac231](https://forums.unrealengine.com/u/anonymous_user_b255ac231)\
**Post date:** [June 12, 2016, 11:45pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/61 "2016-06-12T23:45:39Z")

</div>

> [@Magneto;546111](#):
>
> @anonymous_user_b255ac231 Great work and nicely polished. Id like to make use of the web browser in a project but was wondering if it’s possible to control the audio and pass it on to be altered?

I would recommend using one of the web browser plugins around the forum if you want more complicated functionality than simply displaying a page, they generally have a more open blueprint api than the in built browser component from epic

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b255ac231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b255ac231](https://forums.unrealengine.com/u/anonymous_user_b255ac231)\
**Post date:** [June 12, 2016, 11:47pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/62 "2016-06-12T23:47:26Z")

</div>

> [@InquisitorAles;544374](#):
>
> Hello , i fixed my problem with 4.12 version and now i’m using official Google VR plugin. It works great in blank projects, but when i tried to package your example from this video - KZOvJtrzTKA i got some strange errors. Firstly, when i’m trying to pack your example, it rendered weirdly on my device  
> ![wqn01lj.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/4/84460aed351cb207b389ee86f77295c313f5a8d6.jpeg)  
> I tried to remove default touchscreen controls from “Input” in project settings, but after that packaged app just crashing without any error message. Maybe this happened because something changed in Blueprints overall? As i said, it only happens when i’m trying to launch your example on Android, on Windows and with default gamemodes on android all works fine.

Sorry, I’m not sure I can be of too much help here, really just haven’t had time to do much with android/daydream yet. I would recommend starting from scratch and following the tutorial, then you can compile and test it on your device and see when it breaks

---

<div class="post-metadata">

**Author:** ![Magneto](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/magneto/32/88717_2.png) [@Magneto](https://forums.unrealengine.com/u/Magneto)\
**Post date:** [June 13, 2016, 9:48am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/63 "2016-06-13T09:48:32Z")

</div>

> [@;546682](#):
>
> I would recommend using one of the web browser plugins around the forum if you want more complicated functionality than simply displaying a page, they generally have a more open blueprint api than the in built browser component from epic

Is it possible then to access the engines main audio mix being played?

I’ve searched but this was surprisingly hard to find any info on. Ideally id like to simply do some volume control and possibly pass it to a visualiser but so far i can only see the option to pick wavs. There must be a way to access engine mix somehow?

---

<div class="post-metadata">

**Author:** ![lrsp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lrsp](https://forums.unrealengine.com/u/lrsp)\
**Post date:** [June 13, 2016, 11:07am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/64 "2016-06-13T11:07:22Z")

</div>

> [@;546680](#):
>
> Alright, sorry for the delay in replying, exam time so don’t have much free time for the next few weeks.
> 
> But I managed to get bounce back / snap back working
> 
> What I found the best solution to be was to  
> a) Store the initial position be need to snap back to (for this I store the relative offset from the pickuper component and transform it back into worldspace whenever I need to)  
> b) disable the pickup objects gravity when we pick it up (we’re going to create our own gravity 🙂 )  
> c) I have setup a threshold for the bounce back to try and eliminate any jitter feel free to mess with this value to suit your needs  
> d) If the pickuped component is greater than the threshold away from its initial pickup location then do the snap back logic  
> e) If the path is clear from the object to the pickuper than simply set its world location back to its initial location (the snap back)  
> f) but if the path isn’t clear we calculate our own gravity in the direction to the pickuper which makes our object always seem like it wants to go back to its initial location
> 
> Anyway the push is up on now so feel free to download it from master 🙂

Hey , that sounds like a smart approach! 🙂 Thanks for this. I’ll update from and play a bit with it.

---

<div class="post-metadata">

**Author:** ![wivy1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wivy1](https://forums.unrealengine.com/u/wivy1)\
**Post date:** [June 16, 2016, 2:03pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/65 "2016-06-16T14:03:01Z")

</div>

> [@;546680](#):
>
> Alright, sorry for the delay in replying, exam time so don’t have much free time for the next few weeks.
> 
> But I managed to get bounce back / snap back working
> 
> What I found the best solution to be was to  
> a) Store the initial position be need to snap back to (for this I store the relative offset from the pickuper component and transform it back into worldspace whenever I need to)  
> b) disable the pickup objects gravity when we pick it up (we’re going to create our own gravity 🙂 )  
> c) I have setup a threshold for the bounce back to try and eliminate any jitter feel free to mess with this value to suit your needs  
> d) If the pickuped component is greater than the threshold away from its initial pickup location then do the snap back logic  
> e) If the path is clear from the object to the pickuper than simply set its world location back to its initial location (the snap back)  
> f) but if the path isn’t clear we calculate our own gravity in the direction to the pickuper which makes our object always seem like it wants to go back to its initial location
> 
> Anyway the push is up on now so feel free to download it from master 🙂

A further complication for the grabbing: if the object being held is long (for example a sword), would it be possible to have the object “pivot” around the point where it is being held? Say the sword tip hits a solid object but the player’s hand keeps moving, the natural result would be for the part of the sword being held to remain attached to the controller, while the tip is stopped, resulting in a rotation of the sword around the hand. Is this possible, and if so, how could it be implemented?

---

<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:** [June 16, 2016, 5:47pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/66 "2016-06-16T17:47:11Z")

</div>

@ - Do you think you’d consider implementing two-hand items and pickup of components into the world interaction example? Alternatively, an idea of how you think support for picking up components and two-hand items into the example would be useful as well.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b255ac231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b255ac231](https://forums.unrealengine.com/u/anonymous_user_b255ac231)\
**Post date:** [June 19, 2016, 12:58pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/67 "2016-06-19T12:58:12Z")

</div>

> [@wivy1;548945](#):
>
> A further complication for the grabbing: if the object being held is long (for example a sword), would it be possible to have the object “pivot” around the point where it is being held? Say the sword tip hits a solid object but the player’s hand keeps moving, the natural result would be for the part of the sword being held to remain attached to the controller, while the tip is stopped, resulting in a rotation of the sword around the hand. Is this possible, and if so, how could it be implemented?

You could look into [physics constraints](https://docs.unrealengine.com/latest/INT/Engine/Physics/Constraints/) I’m not sure if I’ll have time to look into it for a little while but If you get it working let me know

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b255ac231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b255ac231](https://forums.unrealengine.com/u/anonymous_user_b255ac231)\
**Post date:** [June 19, 2016, 1:01pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/68 "2016-06-19T13:01:55Z")

</div>

> [@n00854180t;549103](#):
>
> @anonymous_user_b255ac231 - Do you think you’d consider implementing two-hand items and pickup of components into the world interaction example? Alternatively, an idea of how you think support for picking up components and two-hand items into the example would be useful as well.

You can already pickup components, sort of, haha. The system is far from final and that’s why I haven’t quite done any documentation on it just because I expect it to change in a bit. As for two handed interaction, I’m not sure if there is any clear cut way of how the best way to handle it. I know for instance the Job Sim guys just ended up taking it out as it has a lot of edge cases (like what happens when one hand goes off of the object but the other stays on)

---

<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:** [June 19, 2016, 6:18pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/69 "2016-06-19T18:18:35Z")

</div>

> [@;550593](#):
>
> You can already pickup components, sort of, haha. The system is far from final and that’s why I haven’t quite done any documentation on it just because I expect it to change in a bit. As for two handed interaction, I’m not sure if there is any clear cut way of how the best way to handle it. I know for instance the Job Sim guys just ended up taking it out as it has a lot of edge cases (like what happens when one hand goes off of the object but the other stays on)

So what I ended up doing (haven’t tested yet) was to set it up in the Tick event to do a SphereOverlapComponents _first_, and then check to see if the owning actor of that component has implemented “MultiPickupableInterface”, if it has and the component we hit _is not_ the root component, grab the component. If it doesn’t implement the interface, or the component we hit was the root component, it gets passed to the code which grabs the actor as normal (bypassing the SphereOverlapActors in some cases when possible, since we have the actor to grab already).

For two hand I think I will change the part where it checks if something is already held and set it up to check if it hit a different component than what the other hand is already holding.

Edit: Also to help facilitate two-handed items, I made the “MultiPickupableInterface” take a component as an input to OnHovered and OnUnHovered to better help with implementing two handed items. I figure that any two handed items would need to have special code in OnPickup/OnDrop to help figure things out, anyway, as a base, but I haven’t set that up yet or tested any of it.

The way I see it any two hand items other than the most basic stuff (buttons, levers etc that don’t come off) would need to be specifically handled in the item blueprint, but I don’t think that’s a problem necessarily either.

* * *

On a side note I was able to get @fengkan 's archery demo working with the Pickuper based system (this one: [Made a VIVE Archery demo in UE4 - XR Development - Epic Developer Community Forums](https://forums.unrealengine.com/showthread.php?112677-Made-a-VIVE-Archery-demo-in-UE4)).

It’s somewhat messy and I had to implement an interface for getting the currently held object as well as Pickupers from the player, for things like measuring distance between hands, checking if the bow is held, and dropping/picking up the arrow when nocking and denocking. Not ideal, but it works well and aside from passing through which hand an item was picked up in, everything is inside the bow and arrow blueprints, rather than as changes to Pickuper or in the player, and the normal pick up works.

* * *

Edit Again: I also noticed a bug in that the HoveredObject is not cleared when dropping stuff, which makes it so that you can still pick stuff up that you had previously grabbed, regardless of distance. Setting HoveredObject to none on drop fixed it for me.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b255ac231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b255ac231](https://forums.unrealengine.com/u/anonymous_user_b255ac231)\
**Post date:** [June 26, 2016, 7:00am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/70 "2016-06-26T07:00:06Z")

</div>

Ok I’ve overhauled the World Interaction Level adding

- Pressable Button
- Lever
- Drawer
- Cartridge
- Slider

I’ve also modularised the Trace Interaction to make it easy to use in an  
existing project.

I should be finally getting around to the documentation now that the system is a bit more developed

Here’s what the new components look like

Button  
https://.com/watch?v=dXN8d21qCAs

Drawer  
https://.com/watch?v=WYUFGFBswIQ

Cartridge  
https://.com/watch?v=MPO5k0P1xMI

Slider  
https://.com/watch?v=68ygjJRCuKY

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b255ac231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b255ac231](https://forums.unrealengine.com/u/anonymous_user_b255ac231)\
**Post date:** [June 26, 2016, 7:00am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/71 "2016-06-26T07:00:37Z")

</div>

Lever  
https://.com/watch?v=y0d9UUkw288

---

<div class="post-metadata">

**Author:** ![greggus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@greggus](https://forums.unrealengine.com/u/greggus)\
**Post date:** [June 26, 2016, 8:04am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/72 "2016-06-26T08:04:59Z")

</div>

Awesome , thank you 🙂

---

<div class="post-metadata">

**Author:** ![BeehiveBob](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/beehivebob/32/1059109_2.png) [@BeehiveBob](https://forums.unrealengine.com/u/BeehiveBob)\
**Post date:** [June 26, 2016, 4:45pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/73 "2016-06-26T16:45:58Z")

</div>

to get rid of the warning spam 🙂  
[spoiler]

 ![ce29b90be7f4b2058377bf1ced06582b66c96234.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/2/ce29b90be7f4b2058377bf1ced06582b66c96234.jpeg)[/spoiler]

great update ! I was just about to build a lever actually. but holy cow, if I had all of this earlier… the time saved ¯\_(ツ)\_/¯

---

<div class="post-metadata">

**Author:** ![gozu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gozu/32/869945_2.png) [@gozu](https://forums.unrealengine.com/u/gozu)\
**Post date:** [June 27, 2016, 4:18am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/74 "2016-06-27T04:18:36Z")

</div>

Hey , thanks for making these, awesome work so far particularly with the trace interaction.

Can i make a suggested feature? for the “in game” menu if you could also select items using the trackpad on one of the vive controllers (i dont know how to do this yet sorry ;), not like a mouse because that would be yuck, but like a gamepad dpad.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b255ac231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b255ac231](https://forums.unrealengine.com/u/anonymous_user_b255ac231)\
**Post date:** [June 27, 2016, 4:48am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/75 "2016-06-27T04:48:19Z")

</div>

> [@gozu;555086](#):
>
> Hey , thanks for making these, awesome work so far particularly with the trace interaction.
> 
> Can i make a suggested feature? for the “in game” menu if you could also select items using the trackpad on one of the vive controllers (i dont know how to do this yet sorry ;), not like a mouse because that would be yuck, but like a gamepad dpad.

Sure, I don’t know if I’ll get around to implementing that functionality in the current system, But it isn’t greatly complicated to do so if I get time i’ll implement it.  
I’ve been thinking of re-writing the system and not relying on UMG as it isn’t quite flexible enough to do what I really want to. But we’ll see, its still early days on that front

---

<div class="post-metadata">

**Author:** ![ameygumaste](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ameygumaste](https://forums.unrealengine.com/u/ameygumaste)\
**Post date:** [July 1, 2016, 7:27am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/76 "2016-07-01T07:27:48Z")

</div>

Hey !!

Amazing new updates! Entire functionality looking great…Thanks for sharing.

---

<div class="post-metadata">

**Author:** ![TechAnim\_Tools](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techanim_tools/32/1213818_2.png) [@TechAnim\_Tools](https://forums.unrealengine.com/u/TechAnim_Tools)\
**Post date:** [July 1, 2016, 8:04am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/77 "2016-07-01T08:04:29Z")

</div>

Congrats for the UE Grants !!!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_389e656c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_389e656c](https://forums.unrealengine.com/u/anonymous_user_389e656c)\
**Post date:** [July 2, 2016, 10:11pm UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/78 "2016-07-02T22:11:56Z")

</div>

> [@;546684](#):
>
> Sorry, I’m not sure I can be of too much help here, really just haven’t had time to do much with android/daydream yet. I would recommend starting from scratch and following the tutorial, then you can compile and test it on your device and see when it breaks

The black left eye is due to mobile HDR being on. Disabling it fixes the problem.  
You should be able to remove the controls, just retry with the latest UE4 version.

Nevertheless, I’m experiencing some issue with the cursor on the GearVR, it renders weirdly. Plus, the example project needs a few optimisations if you need to run it on mobile (e.g. remove the sky, using only static lighting, simplifying post processing and so on)

---

<div class="post-metadata">

**Author:** ![ameygumaste](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ameygumaste](https://forums.unrealengine.com/u/ameygumaste)\
**Post date:** [July 4, 2016, 8:26am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/79 "2016-07-04T08:26:57Z")

</div>

Hey ,

I am unable to get the Motion Controller Trigger event (or any other button click event) to fire on the TraceInteractionPawn. I am able to teleport using the Trackpad Facebutton on the Vive Controller. But no other motion controller button event gets fired. Its weird because in the same level, I can use these button press events on the Blueprints that I have created. What could be the issue?

I am using HTC Vive on a archiviz project. Have also tried debugging using print string nodes but nothing happens. Thanks!

Also, hearty congrats on getting the Epic Dev Grant!!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b1896e8b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b1896e8b](https://forums.unrealengine.com/u/anonymous_user_b1896e8b)\
**Post date:** [July 5, 2016, 9:22am UTC](https://forums.unrealengine.com/t/vr-content-examples/64140/80 "2016-07-05T09:22:40Z")

</div>

Hi ,

your Content Example stuff is just amazing, well deserved Dev Grants!

I have two questions.  
The the teleport are dosen’t work within my scene, every time i bring in my mesh it dosen’t work anymore. Do i have to tell the teleport area blurpint something about my mesh, can’t find anything.  
And how can i make my bluprints grabable from the wolrd interaction pawn. I know that i have to integrate the two interfaces Pickupable Interface and WorldInteractableInterface but it seems not enough.

thank you ! can’t wait to see your next stuff!

[Previous page](https://forums.unrealengine.com/t/vr-content-examples/64140.md?page=3)

[Next page](https://forums.unrealengine.com/t/vr-content-examples/64140.md?page=5)
