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!