Oculus Rift support is now included with CRYENGINE. This article will guide you through setting up VR and also includes important information that you should know before getting started.
For help with configuring your device, please use the official Oculus application and documentation in the link above.
To enable VR in CRYENGINE then follow the steps below:
Once launched, the Engine should be rendering to your head-mounted device.
If you want to make changes to a level i.e. edit your game then you will need to disable VR.
When reverting back to game mode then all of the above steps/any changes made must be reverted
Launch the Engine as admin if you encounter error 308
If so desired you can bind this directly to a key/gamepad button. This can be achieved via Flow Graph using the Debug:InputKey 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.
We have exposed some controls/functions that are related to the HMD device and the Motion Controllers. This can be accessed through Flow Graph.
Allows quick access to position and rotation information related to the VR device.
Allows you to hookup an input to trigger the RecenterPose command.
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.
FlowNodes below are Device/Platform specific. This is subject to change (Layer implementations are WIP on other devices), while others, like Device-specific Controller maps are such by design and are only meant for the specific device concerned.
Allows you to retrieve the button states as well as the trigger, thumbstick and gesture values of the given Touch Controller. (Index should usually be either 0 or 1).
Lets you access properties of the Quad Render Layers of the HMD. Node allows modifying position, scaling and orientation of the layer (specified by Layer input) in World Space.
Lets you access properties of the Render Layer textures of the Layer specified with QuadLayerID.
Name | Type | Default | Description |
---|---|---|---|
hmd_ipd | Variable | -1 | HMD IPD override (in meters, floating point) -1 - Use system provided value |
hmd_low_persistence | Variable | 0 | Deprecated |
hmd_dynamic_prediction | Variable | 0 | Deprecated |
hmd_queue_ahead | Variable | 0 | Deprecated |
hmd_projection | Variable | 0 | Selects the way the image is projected into the HMD: 0 - normal stereoscopic mode |
hmd_perf_hud | Variable | 0 | Performance HUD Display for HMD's 0 - off |
hmd_projection_screen_dist | Variable | 0 | If >0 it forces the 'cinema screen' distance to the HMD when using 'monoscopic (cinema-like)' projection Used with Oculus SDK 1.2 or above only |
Solution:
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 Sandbox Editor.
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.
In some extreme instances the screen can boot to an orange screen detailing "Application is paused while an old SDK application is rendering".
Solution: Try stopping then restarting the Oculus service through the Oculus Configuration Utility (found under the Tools menu).