VR Template Guide for Unreal Engine

Reading Time: 5 minutes

Last modified date

Comments: 133

Unreal Engine 4.13 introduced the official Virtual Reality template made entirely in Blueprint. The template further simplifies getting started with VR in UE4. In this guide I go through the features and several tips on how to go beyond the template to build your own VR projects.

This VR template is targeting desktop and console only. It supports Oculus Rift, HTC Vive and PlayStation VR out of the box. Other platforms such as GearVR are not officially supported, but with some changes to the project settings (following Android/GearVR Documentation) you can get this template running on your GearVR device.

To get started, simply download Unreal Engine 4.13 through the Epic Games launcher and create a new project using the Project Wizard. The template is listed as “Virtual Reality” in the Blueprint-section. At the time of 4.13 there is no C++ version of this template.

Unlike the traditional templates shipped with the engine, this includes two maps! This separates the different types of locomotion for the available hardware features (eg. with or without motion controllers) you can find both maps under VirtualRealityBP/Maps/ in your Content Browser. The differences and features of each implementation are detailed below.

vrtemplate_statermap

HMD / Gamepad Teleportation

Map: VirtualRealityBP/Maps/HMDLocomotionMap

A simple teleport locomotion where you can use the Gamepad or keyboard to initiate a move. Press and hold to pin your teleport destination, you may now either look at the new direction of your teleport (this will update your neutral rotation) or use the thumbstick on the gamepad to set a new neutral rotation of your character.

ue4 vr template teleport

Motion Controller Teleportation

Map: VirtualRealityBP/Maps/MotionControllerMap

This type of teleportation required a motion controller. Point in the direction and press the thumb control (eg. Touchpad on the Vive) to initiate the move. You can use the outer edges of the touchpad to set a new neutral rotation.

This type of locomotion utilizes a navigation mesh. the navmesh is used to filter for valid destinations while teleporting. See Blueprints migration section for more info. (Press “P” to visualize the NavMesh in the editor viewport)

vr template for ue4

Alternate Rotation Mode

The PlayStation Move controller doesn’t have an axis input, so I built an alternate rotation mode that you can optionally use for other platforms such as Vive as well. You can can manually enable this for other platforms than the PS4 by setting UseControllerRollToRotate in the MotionControllerPawn Blueprint.

vrtemplate_alternaterotationmode

Room-scale Support

Room-scale is visualized around the teleport target. The square outline mesh is only rendered when Room-scale setup was run successfully on the Vive. The room-scale can be rotated using the thumb controls on the motion controller or by using the alternate rotation mode described above.

Object Grabbing

Using the trigger controls you can grab and move the simulated boxes on the table. When near a grab-able object the controller shakes and the hand mesh takes on a different pose.

It may be interesting to know the collision (eg. to punch the boxes) on the hands are only active while the trigger is pressed (the hand looks like a fist)

vr template hands for ue4

Adding your own objects to grab

To add new types of objects you need to implement the Blueprint Interface (located  at VirtualRealityBP/Blueprints/PickupActorInterface) at your own Blueprint that you want to make grab-able by the VR hands. There are docs available on how to implement blueprint interfaces.

Project Optimized for VR

The template comes with a number of rendering optimizations for VR. For more info on optimizing your own current project for VR, check out the VR Guide for UE4 (Specifically the Performance Considerations section) In the Rendering & Performance Settings I explain how to migrate these over to your own project.

Dynamic Shadows

The simulated cubes (blue) cast and receive (dynamic) shadows which is a usually costly feature. However, this cost can be cut in half by enabling “Single Sample Shadow from Stationary Lights” on your movable Actors. This feature makes shadow receiving on dynamic objects much cheaper at the cost of some quality. It doesn’t work for all scenarios, but is worth playing around with for your dynamic objects for potentially great performance gains.

Get Started

Simply down the Engine version 4.13 or up from the Epic Games Launcher. Create a new project and select “Virtual Reality” in the Blueprints category. For additional help on getting started I recommend reading up on my VR Guide for Unreal Engine 4.

To check the template input mapping you can simply open up Edit > Project Settings… and browse to category Input. They should be fairly self-explanatory.

  • Gamepad Mappings
    • Gamepad bottom face-button (eg. A on Xbox controller) OR Enter-key = Initiate teleport
    • Gamepad Left Thumbstick = Change orientation during teleport
  • MotionController Mappings
    • Touchpad Press = Initiate teleport
    • Touchpad Axis = Change orientation during teleport
    • Trigger = Grab Object

Migration to your own project

Many of you may be looking to integrate some of the template features into your own existing project. I’ve list some  potential issues and most important files to migrate.

Blueprints

Using UE4’s Built-in Migrate Content feature you can easily move over content and dependencies into your own project. You can right-click the Pawn Blueprint of the teleportation type you wish to use in your own project and selecting Asset Actions > Migrate.

The motion controller based locomotion requires a NavigationMesh to filter for valid teleport destinations. To override this behavior with your own filtering is pretty easy and you should start by looking at the BP_MotionController Blueprint’s TraceTeleportDestination function.

vrtemplate_bpnodes01

Rendering & Performance Settings

To migrate over the performance settings from the template check out the /Config/ folder of the template folder. In particular the entire DefaultScalability.ini file and the [/Script/Engine.RendererSettings] section of DefaultEngine.ini contain useful scalability for your VR project.

Feature Highlight Video

Posted via the official Unreal Engine YouTube, I did a walkthrough of the VR Template on the weekly Livestream.

Walkthrough by REEL Pictures

I quite like the following video walk-through of the VR Template by REEL Pictures. It guides you through the available features in the motion controller level.

That is all for the VR Template guide! Have fun in VR! Please also check out one of the many other tutorials for Unreal Engine 4, like getting started with VR or follow me on Twitter.

133 Responses

  1. Hi, could you tell me how to move the vr pawn(camera) with blueprint in gear vr?
    And how can I test the Gear vr in ue4? Thank you so much!

  2. Does anyone know how to shoot a projectile out of the hand with teleportation using the vr template? I have a projectile shooting out of the head, but not the hands because bp _motioncontroller is not a player controller, I cannot cast to it from MotionControllerpawn.

  3. hi Tom can we use Motion Controller map for Oculus motion Controller ? Moreover any info to set input setup thank you

    Great Template Congr…

    • I have the same question – wonder if you plan to extend template for oculus touch with extended hand gestures (or if you know any template/tutorial for this)

    • Because Character adds no feature that we desire, Character purely adds a mesh and character movement component, neither is useful to us in VR.

      Cheers,

      Tom

  4. Hello Tom

    Great template.

    I saw you can setup the Vive controllers the same as the ps4 where you rotate the controller instead of using the track pad. I am having the same issue where people are getting disorientated using the track pad.

    I am new to unreal could you attached a image of how to wire the nodes together for
    Use Controller Roll to rotate.I gave it a go but wasn’t sure.

    Thanks Krish

    • Hi mate,

      There is a boolean for this in one of Blueprints here is the quote from the guide above:

      “The PlayStation Move controller doesn’t have an axis input, so I built an alternate rotation mode that you can optionally use for other platforms such as Vive as well. You can can manually enable this for other platforms than the PS4 by setting UseControllerRollToRotate in the MotionControllerPawn Blueprint.”

  5. Hi Tom, I’m looking at replacing the nav mesh and using my own mesh so I can eaiser define places my player can go on multiple floors without using loads of nav mesh modifiers? Do you have any idea how I could achive this?

  6. Hi Tom,

    This is great is there any chance you will make basic interactions tutorial or sample scene? Like opening closing doors etc etc.

    Bests

  7. Have tried again and again to get this to work with 4.17 and no go on daydream. The app crashes on launch. If i remove the steam chaperone, it works. But then the teleportation system breaks. Any clues?

  8. Hi Tom, i have two things i cannot solve with the vr template, using the Vive. I spend so much time fixing it, but unfortunately without result!
    1 how can i follow the contour of the floor/ landscape? If i teleport, the teleport follows very good the landscape/ stairs. But when i start walking its always horizontal. Is there any option i can set the camera on a fixed height or something like that?
    2 cutscenes with a camera don t work anymore with the VR template. Using matinee camera director? I know it can cause some sickness, but that cannot be the reason it doesnt work anymore i guess. Have you a solution?

  9. Are there frequent issues with new installations of UE4.16.1 and SteamVR for th Vive? (brand new setup at work, and Vive worked fine on Stingray, now testing with UE4 — and Epic’s VR Template is not allowing player any VR interactions when choosing Play in VR Preview)

    • maybe you made the project in 4.15 and migrated to 4.16? Then some compile errors pop up. 4.16 should work perfect.

  10. When I try the MotionControllerMap with my htc Vive. I found my virtual hands both laying on the ground no matter where the physical controllers are. It seems that the controllers are not correctly tracked. Did I miss some settings or what? Thanks.

  11. Hi Tom,
    I’ve recently sparked an interest in learning how to develop in the VR environment in unreal engine, How ever it seems like all tutorials and development I’ve seen so far is built upon unreal’s blue prints. My question to you is would it be possible to take what you have applied to the your other projects like the “Survival game” that was built on C++ and insert it into my own VR environment.

    Also if you could point me to some simple entry point C++ or blueprint VR tutorials.

    Thanks in advance!

    • There is indeed a surplus of Blueprint tutorials and still a lack of UE4 C++ tutorials out there. It’s possible to use my previous C++ work in a VR environment, although VR is a different beast, so you’d need to make some major changes to the survival games to make that work nicely.

      As for beginner C++ tutorials, I might advice you to check out Udemy, there are some popular tutorials on there (I didn’t use any of them, but they get high reviews)

    • Thanks Tom for your amazing work.
      I have the same issue than Brian Choi and many other.
      It’s about a map with many floor. When the trace hit a colision the teleport go on the next floor.
      (like the picture in the link of Brian)
      Do you have an idea for fix it ?

      I try many way.
      1 – two separate navmesh. same issue
      2 – with navmesh modifier instead of colision. same issue
      3 – a lot of thing. same issue

      I try to find in the blueprints but it’s to complicate for me.
      Thanks for your time.

  12. I think it would be a great idea if the regular first person controls (wasd & mouse) would be added to the default VR template. That way, if @start the headset isn’t connected you can experience the project without any problems as well.

  13. Is there anyway to switch between the VR HMD Locomotion and regular First Person Character movement?
    I’m trying to migrate the HMD Locomotion pawn to my First Person Player Map and I am having difficulty even getting the VR HMD to activate when I play the level.

  14. Hey Tom,

    Could you make an addition to this guide about implementing multiplayer into this? I’m breaking my head over all the replicating variables. For example, I can’t get rid of a bug where I’m also controlling the other players hand movements.

    Best,
    AJ

  15. Hello! How do I add more interactions to the motion controllers? I would like the top middle button to trigger a flashlight on and off.

    best,
    LaJune

    • Just like you would normally with other input. In the template I added new input events in the Pawn (not the BP_Motioncontroller as it by default does not receive input events)

      Edit > Project Settings > Input, is where you can add your own input events, after which you can call these events in your Pawn class.

      Here is a cheat-sheet I found for some of the buttons for the Vive. http://imgur.com/jgdRuzt

  16. Tom:

    Trying to get the RecastNavMesh-Default Agent Radius setting small enough so that I can enter a crowded room with Blueprints that contain objects with collision properties. The default Agent Radius of 35 is too large for the green NavMeshVolume to flood into the room. When I decrease the Agent Radius down to 10 or less, the NavMeshVolume floods into the room but the teleportation aspect of your cool VR template does not work…

    Any ideas and can you suggest any other settings that I should manipulate in order for this to work?

    Art in Seattle

    • Hi Art,

      You can disable “Can Ever Affect Navigation” on your Blueprints so they don’t cut into the nav-mesh. That might already be enough for it to flood into the room.

      Double check if your level doesn’t have multiple nav-meshes after changing the default agent radius. This may affect the teleportation.

      – Tom

  17. Tom:

    I have a medical clinic project that has a typical exam room with lots of stuff in it – furniture, mobile CPU workstation, chairs, et al. I have successfully migrated my clinic project into your VR template and can teleport/warp around at will. Very nice! I am trying to integrate the pick up interface with various objects in my scene so that medical planners can have options to locate those objects in game with an HTC Vive HMD and motion controllers.

    Question:

    When I install a NavMeshBoundsVolume for the VR teleporting to work, I see the green shading indicating where I can move in VR. Of course, my typical exam room is full of stuff in it and the green shading does not flood into the room as a result of the objects and collisions associated with them, I am assuming…I know, this is dangerous to assume, but I am at the beginning of this long journey, so my apologies. When I turn down the Agent Radius on the RecastNavMesh-Default so that the green area floods inside the exam room, the teleportation aspect of the VR hands does not work. I cannot lower this Agent Radius below “35” , it’s default setting if I want the teleportation to work and cannot access my exam room to pick up and move stuff.

    Any ideas?

    I’m stumped….

    You can reach me at:

    aegstuff@yahoo.com

    If you have a moment to chat.
    And hey, thanks again for your excellent work!

    Art in Seattle

  18. Hi Tom, thanks for this template and guide. It’s very helpful to see how you’ve set it up.
    I’m trying to set up some more “Touch-specific hand poses” and having a difficult time figuring out the best way to animation mix between touch poses like, open, pointThumbUp, pointThumbDown, ThumbUp, ThumbDown, closedThumbUp and closedThumbDown. There are several more poses that the Touch controllers allow for with the capacitive buttons, and I’m wondering how you would go about modifying your setup to add them? Would they all be 1D blendSpaces that you would additively blend? Would they all be “states” in a state machine? Or would you create slots for specific joints and combine them with cachePoses? sometimes the potential amount of ways to do things in Unreal gets me.

    • Hi Andrew,

      In the Template I ended up using a BlendSpace and converted the Enum of the “gripState” to an integer. Another good option for your case is to use “Blend Poses by Enum” eg. the GripState in the template (After creating the node, right-click to add new states so you can assign your poses)

      You’ll need an Enum for this just like the Template, that makes it easy to map the animation and use it for a gameplay state in your blueprints too.

      https://i.gyazo.com/65756c5eb8ad33fd958d5571da295b93.png (editor screenshot from AnimBP)

  19. Hello Tom. Just a quick question. Is there way to disable the teleport rotation? I want the rotation of the headset to dictate the orientation at the destination. Not the outer ring of the thumbpad. I have many people who keep pressing the down part on thumbpad and turns them around and gets disoriented.
    Also, is there a way to disable the room scale boundary box?

      • you figured it out but did not share it :) we have the same problem with people disoriented

        i’ve disabled it by disconnecting the event ticks for the rotation but the problem is that the first time i teleport the rotation is in opposite direction, the next time i teleport it’s fine, so far i haven’t a way to fix it

        • looks like i figured it out as well, i’ve float + float to lock the values in the motion controller panw event grapht left and right hand teleportation functions (Tom locks it forward when its X+Y) but i am not sure this is the best way to disable it

        • Sorry, I shared it on Epic forum but not here. In MotionControllerPawn, there is LeftHandTeleportRotation and RightHandTeleportRotation. I just disconnected them from the Event Tick.

    • I’ve finally solved it by raising the thumb deadzone value to something high like 10, i made the variable editable as well

  20. Is there a way to alter the weight of the objects? The mass and kg on the blueprint, and the object override physics seem to have no effect on this setup. Even if I put mass of 100, kg 10000, it doesn’t matter. The only thing that seems to work for me is damping, but I want for an object to be thrown off with different velocity based on its weight. In this setup a couch or a plate are thrown as if you were superman and weight didn’t matter.

  21. Hello Tom,

    I have question for you. I am working on VR room interior project using UE4. All things are works perfect in my project. But i want to achieve hand collision to the objects. Like whenever i pick up object by one hand then another hand should not be get through of that object. (Please see the reference image here – http://imgh.us/RefImg.jpg )

    Please help me for this how could i achieve this.

    • Tricky mate, since you don’t want to restrict the hand movement too much or it will cause weirdness for the player. Perhaps it’s better to use a material effect to fade out the hand when it moves through the object instead? Another thing to try is use a spring component instead of directly attaching the hand mesh to the VR controller location (altho since it’s physics based I fear it might be a little jittery) I think using something like the material fade is a cleaner solution.

      Hope that helps!

      – Tom

  22. Excellent work Tom! I appreciate what you are doing for the VR community. I’m an architect and am using your template in our work. I’m also learning about VR and UE4. I have an HTC Vive that is just the nicest piece of hardware I’ve used in a long time.

    I am migrating my clinic model into your VR template and can teleport around the outside of my model but am having some trouble getting the teleport function to work with the exception of areas just inside an empty building. I have collision volumes on the exterior walls, but none inside the empty building. I also have a RecastNavMesh set up that comes from your VR template that extends beyond the exterior walls of my clinic model.

    What could be preventing the “projecting ray” and “rectangular area and arrow” from projecting to the next teleport area? Weird.

    Any help would be greatly appreciated…may i send you some images?
    Chat on Messenger?

    Art in Seattle

    • Hi!

      The line trace is likely colliding against the rough collision of the house mesh. A quick fix is to use Complex tracing (a checkbox in the BP_MotionController Blueprint) that will add some performance cost, but will give you more precision in the line trace. The easier thing to try first though is to use complex collision on your house mesh (assuming it’s imported as one big chunk)

      1) In your static mesh set the Collision Complexity to “Use Complex Collision as Simple”.This is the easiest fix to try in your project.

      2) Alternative:

      The function is called TraceTeleportDestination in the BP_MotionController Blueprint, look for the node PredictProjectilePath and enable Trace Complex.

      On the EventGraph of the same Blueprint you may also want to enable Trace Complex on the LineTraceForObjects in the comment section labeled “Handle Teleportation Arc”.

      Hope that helps!

      Tom

  23. Hi tom,
    great tutorial!!!

    I’ve a question, How do you implement reload and other features on motion controller shake, swing. I mean from where should I start. what approach should I take.

    • Hi David,

      Not sure I understand exactly what you’re looking for. Are you looking to do gestures? I know there is a gesture marketplace item available.

  24. Edit: I checked this problem in the motion controller map in a Blanc VR template. no matter how big
    I scale the pickup pickup cubes, they all behave the same when I throw them. Changing the mass scale in the BP or applying a physics material with a very high density has no effect either. I’m using 4.14 and oculus touch. Thanks for your help!

  25. hi tom, thanks for this nice template! I noticed that there seem to be no way to change the mass of the pickup cubes or any other BP in which I implemented the interface. I have stones in different sizes in my game and I want them to behave differently when I throw them (the big ones should not fly as far as the small ones if I throw them with the same speed) I tried changing the “Mass Scale” setting in the BP and the greyed out “mass in kg” updates correctly, but I could not see any difference in behavior. I then applied a physics material to the mesh itself – no effect either. Am I missing something? Thanks for any help!

  26. hi Tom thanks for the quick reply. Next week at the office i can check it out. These are not my own meshes by the way. I even started a new clean project with this template,… it also appears. So i think everybody must have the same problem i guess?

  27. hey Tom, just started today with this great template for the HTC vive. But encoutered something i cannot solve. tried many things but no result till now. Its about the collision, somehow i cannot step on objects, boxes, landscapes, etc. I just fall through it. Weird is that the default floor is with some kind of collision. But any other mesh is without the good one. So hopefully its just a matter of a little change in the BP?

    cheers robert

    • Not sure what’s going on there, I’m just going to dump my initial thoughts, maybe it’ll help you along.

      Are those your own meshes? You need to make sure they have some collision assigned (Usually they would) in the Static Mesh Editor (Toggle the Show Collision in the top to visualize, also in the topleft you should see the collision primitive count) I bet this is fine, but double checking regardless.

      Another thing is to check the nav-mesh with “P”, and check if it’s as expected.

      Besides that it’s a matter of checking your collision on both your Pawn class and using

      “Show CollisionPawn” command to see if there is anything to collide with.

      Hope any of this helps!

  28. I’m the position where I need to be able to migrate the VR template, blue prints and files? I have no idea which one. I would hate to think I get this wrong. Please could help and advise of the files that are needed to import into my scene to obtain the teleport and the hands.

    • You can migrate by right-clicking the content files (Asset Actions > Migrate) By simply selecting the Pawn Blueprint in the content browser, and migrating that, it will bring along all its dependencies with it (you will see the full list of dependencies that will be migrated before confirming)

      – Tom

      • Hey Tom, excellent work! As I am learning fantastic stuff in UE4, your work has helped me tremendously and is an integral part of making our projects in VR.

        I have some questions about migrating assets that work with the motion controller pawn. I have an HTC Vive and motion controllers:

        1. When I right click the Motion Controller Pawn in the Content browser and choose “migtrate”, you say that everything I need to use my Vive with my UE4 model comes along?
        2. When assets are successfully migrated, does the Motion Controller Pawn conflict in any way with the “First Person Shooter” pawn that I started my model with?
        3. Does the RecastNavMesh-Default asset come along as well?
        4. This is the asset that allows the VR pawn to navigate the model, yes?
        5. If the RecastNavMesh-Default does not come along, I then I need to insert a new NavMeshVolume?
        6. Will the Motion Controller Pawn trigger an Event Box so that my “open door blueprint” will work…it does not at the moment!
        7. Is this the easiest way to get your excellent VR assets into my UE4 project or should I migrate my UE4 assets into your UE4 Template?
        8. I apologize in advance for the UE4 “newbie” question: Do lights set up in my UE4 project migrate as well as other assets?

        Thanks for all the hard work you are doing for this community, I appreciate it!

        Art in Seattle

  29. Hi Tom,

    So incredible thankful for your work on this VR template for the community.

    I am working on a complex project that requires alot of post-processing.

    I have experienced on many occasions that post-processing, in particular depth of field (Bokeh and all other depth of field effects) stop working.

    Have you experienced this?

    Does the template file have special ini. adjustments I should be aware of and look into, for optimizing the look of the project? We are running purely of Titan X pascal for this so fps is currently not a real issue.

    Thanks!

    Jakob

    Btw. are you ever available for hire/freelance?

    • Hi ibrews, I’m trying to do this with s8+, newest gear vr and controller. Was the height literally the only thing you changed? Also, I was able to package a blank fps template to my s8+ but when I run it, it doesnt prompt me to place the phone in the gear vr. Any idea what I did wrong? Thank you

    • Hi! I still cannot get this to work on Daydream and unreal 4.17!! It crashes on launch Black screen. It seems as if the steam vr chaperone causes the conflict. Any ideas???

      • You can try making a copy of your project, and deleting the chaperone altogether. I don’t have a Daydream device, so I have no idea about other compatibility issues.

        – Tom

  30. Migrated VR template’s assets into my office model’s FirstPersonBP successfully.

    VR arena “next door” to office model in 3d space. Once I navigate to the office model and go inside it, the quality of the graphics reduces to a pixelated non-aliased mess…when the VRPawn is in the VR template’s arena, everything looks fine. It’s when I go into the office model that graphic quality goes south. Any ideas?

    Art in Seattle

  31. Tom:

    Excellent template! Great work and thanks so much for sharing it with the VR world out here!

    I am an architect in Seattle and have some questions.
    I am using an HTC Vive headset and controllers

    1- I’ve migrated your template assets into my office project successfully.
    2- I see the VirtualReality and VirtualRealityBP folders fine in my Content folders
    3- I did a CTRL C and CTRL V with the VR assets picked while in the MotionControllerMap
    4- Your VR assets came in just fine into my FirstPersonBP map
    5- Everything worked just fine, teleporting, picking up and throwing the boxes et al
    6- Started to expand the template arena bounds so that I could go into the adjacent office model
    7- Started to expand the NavMeshVolume so that I could teleport to the office adjacent office model
    8- Did this in two steps, first in the Y direction and was able to go into my office model but ran into an edge in the X direction with teleport function working
    10- The next time I played the model in VR, my teleport function is truncated and only rays out about a hand length
    11- Teleporting disabled and I can’t move around, even within the existing VR template bounds
    12- What’s going on?

    I don’t have programming skills and would love to find out how I can fix the situation.

    You can contact me at the email address below if you are able.

    I thank you in advance for your reply.

    Art in Seattle

  32. Hello, the template is great except I’m having issue in multi floor level. With everything setup properly, I can point up at the ceiling from first floor and it teleports me up to second floor which is not desired. Is there way to stop this? This is using Motion controller with Vive on 4.13

  33. Hi Tom!

    How can I add gravity to the VRPawn? I want the player drop from the second floor to the first floor. Thanks for you time~

    July Hu

  34. Hi Tom!
    First of all, thanks for your work i love it. I’m new to the making games world and its really cool to know people like you, involved on the comunnity.
    I’ve a question that probably only you could help me. In a little proyect i’m develpoing for VR, i’ve diferent items that you can “grab” with the motion controller and all used to work just fine. With the latest items that I’ve added I notice that when im grabbin them, the rotation doesnt follow the motion controller’s rotation like the rest of the objects (the location yup, but looks like its attached from the root’s location, which is the static mesh comp).

    I found something even weirder that i cannot even understand: some items that were working fine if i add new instances they behave oddly, but if copy and existing older instance they work fine. Do know what could be going wrong, do you have any idea?

    The items working have only 1 component (static mesh)
    The items that never worked have 3 static meshes(1 being the root and the other 2 attached to it)
    The items that used to work have 2 static meshes and 1 collision box (same)

    Thanks for your time :)

    pd: sry for my english!!!

  35. Hi Tom,

    Thanks for the informative guide! One thing I’ve noticed about the VR blueprint template is an issue in the reflections. I can’t seem to get accurate reflections when using a sphere or box reflection capture. If I make the floor a reflective material like chrome I notice that the reflections are completely off. I tried using a planar reflection capture but that didn’t seem to work either. Do you know if there is a setting that is optimizing my project for VR that would be creating this issue?

    Thanks,

  36. Hi, I am new to unreal and I have a project built in 4.13 using the VR motion controller map as my starting point and I’m able to teleport on top of objects like desks for example that I don’t want to be able to. Using the default map, I’m also able to teleport on top of one of the cubes if lowered. I have tried different collision presets and using a navmesh but I am still able to teleport on those objects. Anyone know what I might be doing wrong? Thanks in advance for you time.

    • Hi Nino,

      The HMD-only map is not using navmesh. The default implementation is very simple and only filters to flat surfaces to teleport to. You can make it use navmesh if you’d like, there is an image down the bottom of the post talking on how to REMOVE navmesh from the other sample map, you can do the inverse on the simple HMD-only implementation to have it filter to navmeshes.

      Hope that helps,

      Tom

  37. Hi, this looks great man.

    Quick question, I have 4.13 installed when I go to create a new project I don’t have the VR Template option. Any idea why this is?

    Thanks in advance

    • Hi Joseff,

      The template is only available in the Blueprint section of the new projects. There is no C++ version of it available. Also make sure you are launching the 4.13 version and not one of your earlier installs via the Launcher.

      – Tom

        • I’m afraid there might be no Mac version of the template. I’m not sure what’s required to get this template to run on a Mac (I know very little about Mac support for UE4), but I’ve heard from more people with a Mac that they have no VR template show up.

  38. Hello Tom,
    Thanks for your template,
    When i package game and ran the exe I couldn’t see anything in headset but when i test in editor everything is fine ?
    (I use VIVE)

  39. Hi, i tried to install this template, but it don’t work if i open one of my existing projects.
    I probably copied the file in the wrong folder.
    Can you please tell me the right folder path where to copy the template files?
    Thanks a lot!

    • You shouldn’t really copy over the folders directly. It’s better to just use the migrate option as described in the guide. This just like you would Migrate any other content from one project to another.

      – Tom

  40. Tom – could you help me edit the BP_MotionController so that it allows teleportation only onto object with certain Physical Material properties rather than using a NavMesh (which I have problems creating)? I have created a new Physical Surface type called ‘Teleport’ in Project Settings, but I don’t really know how to tell the BP to only allow objects with this property to be valid targets. Many thanks for reading…

  41. Hey Tom, awesome article!
    Do you have any idea why I get an empty red screen when I try the VR preview with my HTC Vive? Usually the red screen goes away on other games and applications by clicking different windows and then they start working but this time that technique just doesn’t work. Is this issue familiar and do you have any ideas how to fix it?

    Thanks!

  42. Hey Tom, awesome article!
    Do you have any idea why I get nothing but an empty red screen when I try the VR preview with my HTC Vive? Usually the red screen goes away on other games and applications by clicking different windows and then they start working but this time that technique just doesn’t work. Is this issue familiar and do you have any ideas how to fix it?

    Thanks!

    • You can check for collision overlaps/hits on the picked up mesh and apply radial damage to the impact point when it does. Some checkboxes got to be checked to generate such events on either side.

      – Tom

  43. Good article. I have tried migrating from a VR Template into my basic project but am not having too much success. When I launch the packaged project, just one hand appears a at some distance from the controller. Also, the buttons don’t appear to do anything (teleport/grab etc).
    Can you advise exactly which things need to be migrated from a VR template-based project please?

    • Is that just happening in a packaged project? Best bet is to migrate the Pawn Blueprint of the locomotion of your choosing. That should bring along the all the dependencies.

      Key mapping needs to be set up again via the project settings as they don’t migrate with your Blueprints.

      – Tom

      • Thanks Tom. I have managed to migrate now with a bit more success. The thing I am now struggling with is creating a NavMesh. It seems to be very hit and miss with success in creating one despite changing several settings in the resultant NavMesh. Ideally, I’d like to have each horizontal surface as a valid teleport location, but I don’t really know how to update the blueprint with by none-existent coding skills ;-)

  44. Hi Tom, I am using HMD Locomotion Pawn and I want to increse height of my character after i teleport.
    How can i do that? -___-

  45. Hi Tom! This guide is amazing, one question tho’

    In my packaged game, my HTC HMD, doesn’t get any signal, it stays completely black. Do I need to add a SteamVRChaperone to the component tab of the character? Or is it something else? Or do I still need to add the “Enable HMD” on the level blueprint?

    • The way packaged games launch into VR needs improvement. So you should still either launch with -vr on the commandline or ingame run your own command for “Stereo on”. The chaperone component is only for the outline bounds and doesn’t affect the HMD.

      • Hey Tom! Thanks for the quick response mate! I did use the stereo on, and for some reason my character movement is inverted, if I walk forward in-game I move backwards and I end up really high, like over the roof of the small scene I did.

        I’m not sure what I’m messing up with my HTC, but I’ll manage to find out. If you know of the issue, it would be nice to know what it can be. I’m using the motioncontroller pawn.

  46. Hey tom, this is great!
    Any idea why I can’t see the VR templates on the mac? I installed 4.13, but they’re not there..
    Can I download them separately?

    THANKS,
    t.

    • Hi tasook,

      No idea mate! I don’t have a Mac to try this out, I am afraid this is something for AnswerHub so support can take a look.

      – Tom

      Edit: I do vaguely remember Mac support wasn’t on the table because of the limited VR libraries working on the platform (I could be mistaken though)

  47. Hi Tom first of all thanks a lot for this ! This is awesome for learning !
    I have a question though I replaced the hands by the vive controller in the game and I now I would like to create a beam starting from one of the controller. But I can’t figure out how to make it start from my controller, I never get to the controller position. Do you have any idea why?

    Thanks in advance,

    Denis

  48. Hey Tom,

    Thanks so much for the guide !

    I have a question about the force feedback.

    I’m using htc vive and want to feel a force feedback when i touch an object, can you tell me please how can i do that ?

    Thanks in advance

    • Force feedback is already part of the Template. There are a few days to run force feedback right now (they don’t all work across all VR devices right now, this should be fixed in a future release) Check the RumbleController event made in the template on how to do basic force feedback. This function should exist in the EventGraph of either the motioncontroller pawn or BP_motioncontroller blueprints.

      – Tom

  49. Hi, is there some way to migrate this template to a C++ project? I tried a basic code project and migrated the Virtual***_BP folder from the VR Template. Adding the Motioncontrollerpawn at floor level like in the VR Template makes the chaperone & hmd spawn way off. The motion controllers spawn down at level/map floor. No buttons work though and that could perhaps be because I was lazy and copied the DefaultInput.ini from the template project. Anyhow, https://dl.dropboxusercontent.com/u/14257071/VRTemplCPP.zip (~15Mb) if you want to have a look.

    Any ideas?

    • Did you set Auto Posses on the Pawn you added to the level to Player 0? Otherwise a new one is spawned regardless of the one you’ve added to the map.

      As for buttons, you may want to check the input events are still valid (should be in the Pawn’s EventGraph) perhaps they need to be recreated when you move over to another project.

    • Hi Tom,

      Awesome work!

      One question, is it possible to migrate/introduce this to an existing project?

      Another question, would it be possible to change the button for the teleport on the oculus from the xbox controller to the small handheld device? That would be a very slick and nice way of using it.

      Awesome work!

      • Hi Jakob,

        1) Yes, should be quite easy, covered it briefly near the end.

        2) Yes, that’s simply changing the input mapping via the project settings (although I don’t know the key names of the small oculus remote)

        – Tom

  50. Hi! Would room scale be able to work via. Occulus but no controller? Can I use this template for a project that only involves the headset, where the person interacting has to be able to walk round in a 2×2 meter room, sit, lie down, and stand? But no controller?

    Thnx

    • Oculus currently has no roomscale. You can use this template without the controllers but at that point it makes more sense to start from either the HMD locomotion map or just a clean pawn in the template.

  51. Tom this is great– thank you.

    For anyone trying to make new objects interactive and having trouble with implementing the Pickup Actor Interface, the documentation is a little confusing– it makes it seem like you need to implement the actor interface for the level blueprint, which as far as I can tell, you don’t. Here’s what I did that worked:

    1) Select the actor you want to make interactive and choose ‘Blueprint/Add Script’
    2) Follow the documentation instructions to implement PickUpActor interface (ONLY FOR THIS NEW BLUEPRINT, NOT THE LEVEL)
    3) Then you can open up the BP_PickupCube actor and literally copy and paste that entire event graph over to your new one. If you see any errors, then you haven’t implemented the Pickup Actor Interface
    4) Lastly, if you want everything to move around and whatnot (like the example cubes) be sure to set the actor as ‘Moveable’ and check the box for ‘Simulate Physics.’

    That should do it!

Leave a comment on this post!