Menu
Lumberyard
Legacy Reference

Virtual Reality (VR) Nodes

Flow Graph is deprecated and will be removed in a future version of Lumberyard. Learn about Script Canvas, Lumberyard's new visual scripting environment.

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn about the latest features, see the Amazon Lumberyard User Guide.

You can use flow graph modules to set up or script your virtual reality game.

The following flow graph modules are available for any attached head-mounted display.

VR:ControllerTracking

Provides up-to-date information about any attached motion controller's transform (position and rotation) information in game world space. If an entity is specified in the node, all positions and rotations are specified relative to the entity.

Node Inputs

Enabled

Enables or disables the node.

Scale

Scales the controller's movements.

Node Outputs

Left pos

Position of the left controller.

Left Rot (PRY)

Rotation of the left controller in degrees (PRY – pitch, roll, yaw).

Left data ok

Valid data output from left controller. This means that the controller is connected and active.

Right pos

Position of the right controller.

Right Rot (PRY)

Rotation of the right controller in degrees (PRY – pitch, roll, yaw).

Right data ok

Valid data output from right controller. This means that the controller is connected and active.

VR:DeviceInfo

Gets information about the currently connected device.

Node Input

Activate

Updates the output.

Node Outputs

Name

The name of the active HMD.

RenderWidth

The render width for a single eye (in pixels).

RenderHeight

The render height for a single eye (in pixels).

VerticalFOV

The vertical field of view (FOV) for the HMD in degrees.

HorizontalFOV

The combined horizontal field of view (FOV) for both eyes in degrees.

VR:Dynamics:Controllers

Gives up-to-date information about the current HMD transform (position and rotation) in the game world space.

Node Input

Activate

Updates the outputs.

Node Outputs

Left Controller Active

Boolean. Whether left controller is active and being tracked.

Left Linear Velocity

Vector. Linear velocity of the left controller in local space.

Left Linear Acceleration

Vector. Linear acceleration of the left controller in local space.

Left Angular Velocity

Vector. Angular velocity of the left controller in local space.

Left Angular Acceleration

Vector. Angular acceleration of the left controller in local space.

Right Contoller Active

Boolean. Whether right controller is active and being tracked.

Right Linear Velocity

Vector. Linear velocity of the right controller in local space.

Right Linear Acceleration

Vector. Linear acceleration of the right controller in local space.

Right Angular Velocity

Vector. Angular velocity of the right controller in local space.

Right Angular Acceleration

Vector. Angular acceleration of the right controller in local space.

VR:Dynamics:HMD

Provides information about the current angular and linear dynamics of the HMD.

Node Input

Enabled

Enables the node.

Node Outputs

Linear Velocity

Linear velocity of the HMD in local space.

Linear Acceleration

Linear acceleration of the HMD in local space.

Angular Velocity

Angular velocity of the HMD in local space.

Angular Acceleration

Angular acceleration of the HMD in local space.

VR:OpenVR:Playspace

Provides information about the HMD's playspace.

Note

This is now a legacy flow graph node, and has been replaced by VR:Playspace.

Node Input

Activate

Updates the outputs.

Node Outputs

Corner0

The world-space position of corner 0.

Corner1

The world-space position of corner 1.

Corner2

The world-space position of corner 2.

Corner3

The world-space position of corner 3.

Center

The world-space center of the playspace. Note that the center is on the floor.

Dimensions

The width (x) and height (y) of the playspace in meters.

IsValid

If true, the playspace data is valid and configured correctly.

VR:Playspace

Configures the playspace for the Oculus and OpenVR SDKs. The corners represent a rectangle, and run counter-clockwise around the z-axis.

Node Inputs

Activate

Gets information about the HMD's playspace.

Node Outputs

Corner0

Vector value. The world-space position of corner 0.

Corner1

Vector value. The world-space position of corner 1.

Corner2

Vector value. The world-space position of corner 2.

Corner3

Vector value. The world-space position of corner 3.

Center

Vector value. The world-space center of the playspace. Note that the center is on the floor.

Dimensions

The width and height of the playspace in meters.

IsValid

If true, the playspace data is valid and configured correctly.

VR:RecenterPose

Recenters the view coordinate system for the attached HMD to the current view.

VR:SetTrackingLevel

Sets the TrackingLevel of the attached VR device to 0 (head), 1 (floor), or 2 (fixed). When setting the tracking level to 2, the HMD does not apply translation based on the position of the device, only rotation is applied. This is to aid VR experiences that required a fixed head position, such as viewing 360 degree video.

These options determine how the HMD's origin is calculated for every frame.

VR:TransformInfo

Provides information about the orientation and position of the camera and the HMD.

Node Input

Enabled

Enables the node.

Node Outputs

Camera pos

The position of the current camera in world coordinates.

Camera rot (PRY)

Vector. The orientation of the current camera in world coordinates in degrees (PRY – pitch, roll, yaw).

HMD pos

The position of the HMD with respect to the recentered pose of the tracker.

HMD rot (PRY)

The orientation of the HMD in world coordinates in degrees (PRY – pitch, roll, yaw).

VR:VREnabled

Queries whether VR output is enabled and active in the system. A true output from this node means that an HMD is connected, properly initialized, and being rendered to.