Set up Camera

../_images/Camera.png

Whether your Wave VR project is a seated or standing experience, the manner in which the Camera is set up will be the same. This how-to provides steps on setting up the Camera for use with Wave VR experiences.

Steps:

These steps will guide you on project setup requirements, as well as in creating the needed Pawn Blueprints for Wave VR.

  1. Create a new UE4 project with the following settings, and then press the Create Project button:

    • Blueprint
    • Blank Project
    • Mobile / Tablet
    • Scalable 3D or 2D
    • No Starter Content
    • Location for the project to be saved
    • Name for the project
../_images/CreateProject.png
  1. Once the project loads, right-click in the Content Browser. From the displayed menu, go to the Create Basic Asset section and select the Blueprint Class option.
../_images/CreateBlueprint.png
  1. From the Pick Parent Class window, select the Pawn option, and then name it as WaveVR_Pawn.
../_images/CreatePawn.png
  1. Open the WaveVR_Pawn Blueprint, and go to the Component section of the Viewport tab. From the tab, add these two components with the following names, making sure that the VRCamera is a child of VRCameraRoot:
Component Name Value
Scene VRCameraRoot
Camera VRCamera
../_images/CameraComponent.png

Note

Whatever VR HMD you are using, this is the Epic recommended way to set up a VR camera, since it allows you to offset the position of the camera without having to move the actual camera.

  1. Open the WaveVR_Pawn Blueprint. On the Event Graph, drag the Event Begin Play node to show the Executable Actions list. Search for the Set Tracking Origin node, and then click it to add it to the Event Graph. Make sure the Origin of the Set Tracking Origin node is set to Eye Level.
../_images/SetTrackingOrigin.png
  1. In the Variables section, create a new Vector variable called CameraHeight and set the Z value to 180.
../_images/CameraHeight.png

Note

This number, set in CameraHeight, should be set to the real-world standing height of the user in Centimeters.

  1. Drag the output of the Set Tracking Origin node and search for the Set Relative Location node, selecting the SetRelativeLocation(VRCameraRoot) option.
../_images/SetRelativeLocation.png
  1. Connect the Camera Height variable to the New Location input on the Set Relative Location node, and then click the Compile button. When completed, your Event Graph should look like the following:
../_images/BPAllSet.png
  1. Drag the WaveVR_Pawn Blueprint from the Content Browser to a level, making sure that it is placed as close to the ground as possible.
../_images/DragVRPawn.png
  1. Select the WaveVR_Pawn Blueprint, and in the Details panel under the Pawn setting, set the Auto Possess Player from Disabled to Player 0.
../_images/Detail.png

End Result:

To complete the process, go to the main toolbar and click the small white triangle next to Launch Options. Select your Android device from the list to start packaging and deployment to that device.

../_images/Launch.png