Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

CenterEyeAnchor position gives wrong Y co-ordinate when queried in Unity on Oculus Go?!?!?!?

Thunderbox.EntThunderbox.Ent Posts: 40 Oculus Start Member
This is a really weird one. I hope somebody can help...
It's one of those things that was working fine, and then suddenly went all weird for no reason!

I have a script that gets the position of the CenterEyeAnchor, and moves an object to it every frame (so I can track position without rotation.
Here is a snippet of the code...
Vector3 pos = targetObject.transform.position;
transform.position = pos + positionOffset;
...where targetObject is the CenterEyeAnchor, and positionOffset is (0,0,0).
It works fine in the editor, with an Oculus Rift.
In the image below, the central white cube is parented to the CenterEyeAnchor, and the three white cubes below are tracking the position nicely...

My debug text shows the central eye's world space co-ordinates to be tracked at (213.5, 14.4, -57.7).
Now, when I run the exact same thing on Oculus Go I get this:

As you can see, the parented cube is in roughly the same place, so the camera must be in the same space too... but no three cubes. This is because they are below the floor!!!
Debug text reveals that the X and Z coordinates are about the same as before, but the Y is nowehere close (when it should be pretty much identical): (220.2, 7.0, -56.5).

So it looks like transform.position is returning an incorrect Y value for the CenterEyeAnchor on Oculus Go. Which is just freakin' nonsense. I've tried tracking other objects and the values are all OK... so what is it that is special about CenterEyeAnchor? 

Does anyone have any clue what might be causing this? (Probably something really dumb that I have missed).

Thanks in advance for your help!


  • Thunderbox.EntThunderbox.Ent Posts: 40 Oculus Start Member
    UPDATE - If I turn off "Use Position Tracking" on the OVRManager, and set the camera height to 1.6m I see the same weirdness on PC. The camera is at 11.3m but the transform.position says the Y value is at 0.1m.
  • Tolin93Tolin93 Posts: 74
    Hiro Protagonist
    What if you turn off Use Profile Data? 
Sign In or Register to comment.