Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
rsanfeliu's avatar
rsanfeliu
Honored Guest
11 years ago

Influence on Z position of the CameraLeft/Right Object

Hi!

I was wondering what drives and influences the Z-position of the Camera[Left/Right] Objects from the OVRPlayerController prefab.
I am experiencing a strange issue where I have, running two Unity scenes at the same time (one scene is a backup from the other, a few days before), on one scene the z position around 0.09, and on the other almost 0. The prefab is the exact same one between the two scenes and has not been modified, neither in the inspector nor in the script except the OVRPlayerController in the scene is initially rotated 270° around Y axis.

This really bothers me because the user is placed something in front of him in this scene; in the 0.09 one the object is right on place, in the other it's too far front (around 10 cm... Not really a conincidence.)

Cheers! :)
-----------------------------------------------------
EDIT
Ok, so I found out that the
OVRDevice.ResetOrientation ();
was the source of all my troubles. Bascially, I was calling it at the start of my scene, but this resets the orientation as well as the position of the CameraLeft/Right objects, which results in an offset for me. Before calling it (at all, because if you call it once, the values will be saved - by the runtime I suppose - and use the next time), the values where around 0.08, 0.09; After the call, it sticks around 0.0001 in the "now" initial position. If you turn your head around, the value will increase, but the init will still be 0.0001.
Replies have been turned off for this discussion