Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

How do I switch between 6DoF and 3DoF in the same scene?

If you have 6DoF devices and running in 6DoF mode, it can be assumed that the content can switch between 6DoF and 3DoF. Some things to keep in mind if your content needs to switch between 3DoF and 6DoF.

Headset and controller

In 3DoF, controllers are usually in front of you due to a fixed transform. The fixed transform keeps a distance between the controllers and the person using them and this distance may not change even when the controllers are moved. However, in 6DoF, the fixed transform must be removed. If not removed, there will always be a separation between the controllers and the person using them.
In 6DoF, controllers are usually placed in the same place with the headset. This place is the position sensor’s origin,
Vector3(0, 0, 0)
. If you switch to 3DoF, the headset and controllers are always fixed at the origin.

While in VR, if there are no other manipulations to the headset and controllers’ GameObject, you will probably see the controller’s model come out from your head and your head is on the floor. Therefore, fixed transform is still needed to keep a distance between the controllers and floor.

Pose Tracker

In WaveVR_PoseTracker, set trackPosition to false when in 3DoF mode. This flag will not update the position to the GameObject’s transform. This can be done in your script.
controllerGameObject.GetComponent<WaveVR_PoseTracker>().trackPosition = false;

Set trackPosition to true to switch to 6DoF mode.

Render

Render sets the origin type to system every frame when the pose is being acquired. The origin type determines how the pose’s coordinates (0,0,0) should be shown.
Tip: The origin type can be changed in runtime.

For 3DoF, set WaveVR's render.origin to WVR_PoseOriginModel.WVR_PoseOriginModel_OriginOnHead_3DoF. For details, see the SDK API’s description.

var render = WaveVR_Render.Instance;
render.origin = WVR_PoseOriginModel.WVR_PoseOriginModel_OriginOnHead_3DoF;

Eye to head transform

The eye to head transform is a transform to change eye space coordinates to the head space coordinates.

For example, if your left eye sees an apple in front at position (0, 0, 1), the actual location of the apple in the world is:

HeadPose * EyeToHeadTransform * (0,0,1)

Assuming EyeToHeadTransform is:

| 1 0 0 -0.03 |
| 0 1 0     0 |
| 0 0 1     0 |
| 0 0 0     1 |

and the headset's transform is:

| 1 0 0   0 |
| 0 1 0 1.8 |
| 0 0 1   0 |
| 0 0 0   1 |
The eye's transform, (-0.03, 0, 0), can be taken from the head's space. The apple is at:
  • (-0.03, 0, 1) in the head space
  • (-0.03, 1.8, 1) in the world space

The apple's position can also be known from the world space and eye space by the inversed transforms.

EyeToHeadTransform^-1 * HeadPose^-1 * (-0.03, 1.8, 1)

The EyeToHeadTransform may have different values in 6DoF and 3DoF.

left eye in 6DoF
| 1 0 0 -0.03 |
| 0 1 0  0.05 |
| 0 0 1  0.05 |
| 0 0 0     1 |

left eye in 3DoF
| 1 0 0 -0.03 |
| 0 1 0     0 |
| 0 0 1 -0.15 |
| 0 0 0     1 |

The 6DoF transform values change according to your headset. For 3DoF, the transform values are based on your head's rotation center where z is usually -0.15 for better a user experience.

Submit
Thank you! Your feedback helps others to see the most helpful information.