VR Cheat Sheet

Running A VR Game

Unreal Engine 4 (UE4) now offers a number of different ways to run your Virtual Reality(VR) project depending on what your needs are. In the following section, we will cover the most common ways to run your UE4 VR projects for inside and outside of the UE4 editor.

For more detailed information on how to launch and run your UE4 projects make sure to check out the Running Unreal Engine page.

Running from the UE4 Editor

With the release of UE4 version 4.7 and later you can now view your UE4 VR project right from within the UE4 editor by changing the Play in Editor option from play in Selected Viewport (PIE) option to the VR Preview option.

VR_View_In_VR.png

Running from outside the UE4 Editor

You can also run a non cooked Standalone game by first creating a shortcut to the UE4Editor.exe and then supplying the following command line arguments.

UE4Editor.exe [MyProject] [MyMap] -game

Note that [MyProject] needs to be the absolute or relative path to your .uproject file.

Useful VR Console Commands

UE4 provides many useful Console Commands that can help in debugging any issues that you might run into when using a VR device. Here is a list of some of the most common commands that you might use as well as some that are specific to Oculus.

Common Commands

Command Description
Stereo On/Off Enables or Disables stereo rendering for Head Mounted Display (HMD) devices.
r.screenpercentage [30-300] Set the screen percentage. Use a higher number for better quality, and a lower one for better performance.

Oculus Specific Commands

Command Description
Stereo Show Prints a list of settings to the log.
Stereo Reset Resets Inter-Pupillary Distance (IPD) and clears IPD and Stereo overrides.
HMD [Enable/Disable] Enable or Disable the HMD device.
HMD sp [30-300] Set the screen percentage. Use a higher number for better quality, and a lower one for better performance.
HMD Vsync [On|Off|Reset] Control or reset Vsync on your VR device.
Ovrversion Print LibOVR version and build date to the log.