Set Up a Seated Camera for SteamVR

Setting up the UE4 camera to work with a seated SteamVR experience.

Choose your operating system:

Windows

macOS

Linux

VR_Seated_Experiance.png

One of the first things you will need to think about when starting to develop any UE4 powered VR experience to be used with the SteamVR is deciding whether the experience will be a seated one or a standing one. In the following How - To we will take a look at how to set up your UE4 projects VR camera for a seated SteamVR experience.

Steps

Below you will find instructions setting up a Pawn to work with a seated SteamVR experience.

  1. First, open up or create a new Pawn Blueprint and then go to the Component section of the Viewport tab. From there add the following two components with the following names, making sure that the VRCamera is a child of VRCameraRoot:

    Component Name

    Value

    Scene

    VRCameraRoot

    Camera

    VRCamera

    HT_SteamVR_Camera_Setup_00.png

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

  2. Next, open up the Pawn Blueprint if not already open and in the Event Graph drag off the Event Begin Play node to show the Executable Actions list. In the list search for the Set Tracking Origin node and click on it to add it to the Event Graph.

    Click for full image.

  3. The Set Tracking Origin node has two options, Floor Level and Eye Level . For a seated experience you will need to set the Origin of the Set Tracking Origin node to Eye Level .

    Click for full image.

  4. Next, in the Variables section of the My Blueprint tab, create a new Vector variable called ViveCameraHeight and set the Z value to 121 .

    HT_Rift_Camera_Setup_05.png

    For a seated SteamVR experience, you will always want to set the height of the camera to match the real world seated height of the user in Centimeters.

  5. Then, drag off the output of the Set Tracking Origin node and search for the Set Relative Location node, selecting the SetRelativeLocation(VRCameraRoot) option.

    Click for full image.

  6. Connect the ViveCameraHeight variable to the New Location input on the Set Relative Location node and then press the Compile button and when completed your Event Graph should look like the following image.

    Copy Node Graph

    You can copy the completed Blueprint by clicking on the upper left-hand corner of above and pressing CRTL + C to copy the graph. Once copied, go to your Blueprints event and press CTRL + V to paste it in.

  7. Drag the Pawn Blueprint from the Content Browser to a level, making sure that it is placed at 0,0,0 in the level.

    Click for full image.

  8. Select the Pawn Blueprint that was placed in the level and in the Details panel under the Pawn setting, set the Auto Possess Player from Disabled to Player 0 .

    Click for full image.

End Result

Finally, go to the Main Toolbar and change the Play Mode to VR Preview and then press the Play button. When you put your HTC Vive HMD on and view the level while sitting down, you should see something similar to the following video.

UE4 Project Downloads

Below you will find a link to where you can download the UE4 project that was used to create this example.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss