Hello everyone,
I am using the HTC Pro in combination with the Open VR display mode and I am following this guid.
In Steam VR I have finished the room scale measurement.
So intuitively, when starting OpenVR the center of the scene, 0-0-0, should be mapped with the center of the rectangle displayed in SteamVR.
Especially, when putting the HMD on the ground, its z-translation should be approx. 0.
What I did:
C = getCamNode(-1)
z_hmd = C.getWorlTransform()[11]
z_world = C.getWorldTranslation()[2]
z_perspective = C.getTranslation()[2]
According to the mentioned guide, it holds z_perspective = 0, since the camera "Perspective" is set to 0,0,0 when going into VR. z_hmd was as expected equal to z_world.
My z_hmd though, was in approx. -255 in my case.
The environment was also at level 0, my view was therefore slightly below the ground.
What the guid tells me to do is to counter this offset by
C.setTranslation(0., 0., 255.)
By doing so, it fixed my HMD z offset.
What I would like to know, in order to understand this better is:
- Why is this issue occuring? Why is the VRED - z=0 - floor not mapped onto the real floor?
- Why do I get the HMD position using the world space, the z_perspective using the local space BUT the HMD is nevertheless transformed relative to the perspective camera? Shouldn't world space be hierarchically higher?
- Why is the local translation static in OpenVR and the world translation the actual position?
- Is my assumption true, that the HMD view is actually represented by a second camera (a second 4x4 transformation matrix) relative to the original perspective? But this "active camera approach" somehow puts them together into a single node.
- Relative to which system, VRED space or SteamVR system, do I get the coordinates of the camera if it is not so?
I would appriciate very much any clarification!
BR,
Veljko