Skip to end of metadata
Go to start of metadata

Overview

HTC Vive support is now included in CRYENGINE. This article will guide you through setting up VR and also includes important information that you should know before getting started.

Chapters:

Getting Started

  • Runtime: In order to use the HTC Vive you need to install Steam.
  • HTC Vive Documentation: Please read the documentation regarding device setup and configuration - Available from Steam.
  • Video Drivers: Update your Video Card Driver and ensure that you are running the most recent revision that supports HTC Vive.
  • Recommended PC Spec: Information regarding hardware requirements - Available from HTC.

Help with installation and Setup

Icon

For help with configuring your device, please use the official HTC Vive application and documentation in the link above.

Starting the Engine with the Vive Enabled

The process of enabling VR in CRYENGINE has been designed to be as simple as possible. As of CRYENGINE 5.3 this has been simplified further, by requiring five generic steps for all supported implementations:

  1. Connect the device to your computer
  2. Make sure the vendor runtime / application recognizes your headset as ready for use
  3. Install the OpenVR plugin by adding the following line to the plugin section of your .cryproject file

    ,{ "type": "EPluginType::Native", "path": "CryOpenVR" }

  4. Add 'sys_vr_support=1' to your system.cfg or user.cfg file
  5. Launch the Engine (as admin)

Once launched, the Engine should be rendering to your head-mounted device.

Icon

Launch the Engine as admin if you encounter error 308.

 

Input Configuration

If so desired you can bind this directly to a key/gamepad button. This can be achieved via Flow Graph Input:Key node.

Alternatively, you could modify the <game_folder>\Libs\Config\DefaultProfile.xml file and assign a button there.

See Setting up Controls & Actionmaps for more information.

Flow Graph

We have exposed some controls / functions that are related to the HMD device and the Motion Controllers. This can be accessed through Flow Graph:

  • VR:TransformInfo

Allows quick access to position and rotation information related to the VR device.


  • VR:Tools

Allows you to hook up an input to trigger the RecenterPose command.

 

  • VR:ControllerTracking

Similar to the VR:TransformInfo node. This node will allow you to access position and rotation information of a controller. Additionally, you can provide a scaling value as well as a reference entity.

 

HTC Vive Use!

Icon

FlowNodes below are Device/Platform specific, exposed for solely for purposes of device specific interaction, not interoperability.

  • VR:OpenVRController

Allows you to retrieve the button states as well as the trigger and touchpad values of the given Controller. (Index should usually be either 0 or 1).

Frames per Second

The HTC Vive will play your game at exactly 90 FPS if you can make it run at exactly 90 FPS or above.

Icon

If at any point your game runs at even a fraction less than 90 FPS, it will temporarily default down to 45 FPS until 90 FPS is reached again.

Please keep in mind that anything less than 90 FPS is generally not considered to be a pleasant experience in VR.

Possible Issues You Can Encounter

  • Running the Editor with the user.cfg. This will try to enable VR in Editor Mode which it will attempt but can't do.
    • Solution: Rename the user.cfg to something else such as _user.cfg This will bypass the file being read on loading of the Editor.
      NOTE: Make sure to change the name back to user.cfg when you want to use VR again in the Launcher.
  • In some instances the Launcher (GameSDK.exe) boots to a black screen. The game is active in the background but nothing is visually represented on screen.
    • Solution: Delete the the user folder in the root of the build. Then relaunch the GameSDK.exe.