Home Search

DriveWorks Pro 21
XR Orientation

Send Feedback

XR Orientation (Beta)

This feature is currently in Beta due to the technology that it uses. This functionality makes use of WebXR or WebVR depending on browser version. These browser features are not yet widely supported. Check WebXR and WebVR support for more information.

The XR Orientation entity lets you add orientation to a Node in a DriveWorks 3D scene. The X in XR is a placeholder for the type of reality you want to create. Therefore the XR Orientation entity can be used for virtual reality, augmented reality or for tablet orientation. The main purpose of this entity is to pass device orientation and position data to the Node it has been applied to.

The XR Orientation entity can be combined with the VR Camera entity to create a virtual reality experience inside DriveWorks 3D. XR Orientation provides the position and movement data for a VR headset or controllers. It can be used for both and the data they receive can be modified by a property on the entity.

WebXR is newer than WebVR and is becoming the new web standard for virtual reality. Currently browser support is low for WebXR however,as browsers update their support for this technology, more devices will be able to use it.

Supported Devices

List of devices that currently work with XR:

DeviceBrowserAPI
Oculus QuestOculus Browser (native)WebXR & WebVR (Soon to be deprecated)
Chrome AndroidChrome (Version 79+)WebXR
HTC ViveFirefox DesktopWebVR (Soon to be deprecated)

Please note, WebVR may be deprecated following future browser updates.

Information Panel

With a Node selected and the XR Orientation entity added to it, the following will be displayed in the Information Panel:

Orientation Enabled

Enable and disable the XR Orientation using this property. TRUE enables the entity, FALSE disables it.

Device

Select a device to take the orientation data from. This can be one of three options - "Headset", "Left" or "Right".

  • Headset - This is either the head mounted display you are using or the phone/tablet you are using.
  • Left - This is the left hand controller that you may be using for VR.
  • Right - This is the right hand controller that you may be using for VR.

Using the XR Orientation entity

Using the XR Orientation entity is quite straight forward. To make it work with VR headsets and other devices you will need to use the XR Orientation entity along with the VR Camera entity and the Raycast entity. The XR Orientation entity provides the movement whilst the VR Camera displays the image and Raycast enables a click interaction. The first two entities must be combined to create virtual reality with movement.

As well as this, the XR Orientation entity is used to create two hand controllers, left and right. This entity is combined with a model and the Raycast entity to create controllers that can select models in the scene.

The resulting Node structure looks like the following:

image showing vr node structure

XR Orientation is simple to set up, just add it to a Node with the VR Camera entity enabled and tell it which device you want to take movement from.

The XR Orientation entity can take one of three values. These are headset, left or right. Headset is the head mounted VR display orientation, left is the left hand controller orientation and right is the right hand controller orientation.

The Raycast entity is also simple to set up. Each Raycast entity takes a button Id or a list of button Ids. In most circumstances you can simply enter 0|1 into the Gamepad Button Ids property on the Raycast entity. This will cause the Raycast to trigger when the buttons with Ids 0 and 1 are pressed.

The hand model can be simple cubes or more complex models if you want to add them to your 3D scene. These are just to identify where the users hands are and the direction they are facing.

Lastly, ensure that the Enable VR property on the 3D Preview Control is set to TRUE. This enables the VR button on the controls and you can enter a VR mode when visiting a DriveWorks Live website in a browser.