Forum Discussion

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

Changing stereo separation

Is there still a way to change eye/stereo separation in unity?
I was able to create second camera to render different things to each eye, but by default it gets same position as the main cam. Chnaging positions in updateanchors functions doesn't quite work. I'm guessing updateanchors(this) is where it happens, although im not sure if that function is accessible.

If there is just a setting somewhere which I could change during runtime for different eye separation, that would be great.

4 Replies

Replies have been turned off for this discussion
  • Modifying the IPD is strongly discouraged because it will almost always result in user discomfort. However, you can do it by maintaining two separate Cameras that target the two eyes and moving them to the left and right in OnPreRender.
  • If you use the the OVR camera (not the build in VR camera from unity) you can simply scale the OVR camera transform.
  • @Altmeister is right. Scaling the OVRCameraRig (or the Camera if you're not using the Oculus Utilities) is the best way to change the stereo separation because it also scales the tracking data to match. Users won't feel uncomfortable if you do it that way.
  • Ok , not super clear on what to do, but will try scaling first :)
    For scaling you just talking about what is usually set to 1 1 1? what would going lower/higher mean? Smaller scale larger IPD? Wouldn't that make the world look bigger?

    As far as moving cameras apart I tried that a bit, but it didn't work quite right and was only able to change the distance once before I clicked play, later if I changed the public variable that was used in UpdateAnchors, even though the print out of new positions would be different, the cameras would stay same distance apart. I haven't use OnPreRender, assuming that is some other built in UNity function such as Update etc. Would that keep cameras apart constantly or would they bounce back from UpdateAnchors call?


    And I have another question, I can't seem to find a way to disable tracking completely. I want that camera rig to sit still and let me move it based on another tracker. With old version I was able to gut most of the update anchor function and I think disable time warp or something and it would sit still, but now I went as far as commenting out everything in UpdateAnchors and it still moves lol.

    Thanks again