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.
List of devices that currently work with XR:
Device | Browser | API |
---|---|---|
Oculus Quest | Oculus Browser (native) | WebXR & WebVR (Soon to be deprecated) |
Chrome Android | Chrome (Version 79+) | WebXR |
HTC Vive | Firefox Desktop | WebVR (Soon to be deprecated) |
Please note, WebVR may be deprecated following future browser updates.
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".
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:
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.