Forum Discussion
infinite360vr
9 years agoExplorer
How to display stereo photosphere in Unity - Gear VR
I am following this tutorial to view Stereo image in Unity3D. Unfortunately it only covers Oculus Rift and Google Cardboard. Both of there SDKs have two separate cameras for left eye and right eye. Here is a summary of how to do it:
- Create 2 spheres for both eyes and place them at origin.
- Put them in different layers (left and right).
- Set culling mask of each camera (left eye and right eye) to left layer and right layer respectively.
PROBLEM:
In Gear VR camera setup, Oculus SDK is using only one camera component which is on CenterEyeAnchor child of OVRCameraRig:

I don't know how to apply the above procedure in this case. I know there are 2 transforms LelftEyeAnchor and RightEyeAnchor which are used for stereo view but There is always one camera in the scene. Is there a way to achieve stereo rendering for this setup?
Thanks in advance.
11 Replies
Replies have been turned off for this discussion
- AnonymousOVRCameraRig script has an option Use Per Eye Cameras to enable/disable per eye cameras.
- infinite360vrExplorerI don't see anything in inspector.
I have also checked the script, there are properties for left/right cameras:
but only assignment reference I can find is this:public Camera leftEyeCamera { get; private set; }
public Camera rightEyeCamera { get; private set; }leftEyeCamera = centerEyeCamera;
rightEyeCamera = centerEyeCamera; - vrdavebOculus StaffPlease update to the latest Utilities.
- infinite360vrExplorerThanks for responses. I just updated to vs 1.9.0 and it serves the purpose but it created another issue for me:
I am using OVRInputModule from from this post. And due to changes in OVRInput.cs single tap on touchpad is firing click twice. So its impossible for me to turn a toggle off. I was using Utilities vrsion 1.7.0 before.
Does anyone know how to fix this? - vrdavebOculus StaffOVRInputModule needs to be updated to use OVRInput's touchpad support instead of the deprecated OVRTouchpad script. We will do that soon. As a quick hack, you could comment out "OVRTouchpad.Update();" from OVRTouchpad.cs.
- infinite360vrExplorerThanks for responses. I just updated to vs 1.9.0 and it serves the purpose but it created another issue for me:
I am using OVRInputModule from from this post. And due to changes in OVRInput.cs single tap on touchpad is firing click twice. So its impossible for me to turn a toggle off. Does anyone know how to fix this. I was using Utilities 1.7.0 before. - AnonymousI'm having the same issue, Dave. Commenting out OVRTouchpad.Update(); (and in fact all references to OVRTouchpad) doesn't change anything. Changing the joyPadClickButton to None solves it, but may break joypad functionality (can't test that at the moment). Alternatively, commenting out lines 877 - 882 seems to work too.
#if UNITY_ANDROID && !UNITY_EDITOR
// On Gear VR the mouse button events correspond to touch pad events. We only use these as gaze pointer clicks
// on Gear VR because on PC the mouse clicks are used for actual mouse pointer interactions.
pressed |= Input.GetMouseButtonDown(0);
released |= Input.GetMouseButtonUp(0);
#endif
Edit: On further investigation, commenting out 877 - 882 seems to break touchpad swiping/scrolling (at least in Scroll View) - vrdavebOculus StaffThe new behavior of OVRInput was introduced in 1.9. We have a change to OVRInputModule that we'll release in 1.10 to properly support it. In the meantime can you downgrade to Utils 1.8.0?
- infinite360vrExplorer
vrdaveb said:
OVRInputModule needs to be updated to use OVRInput's touchpad support instead of the deprecated OVRTouchpad script. We will do that soon.
If you are updating OVRInputModule at all, here is another issue which I have came across. At the moment OVRInputModule only supports single click. In case, I am looking at a scroll view (with some buttons as childs) and swipe on touchpad to scroll it. I will end up clicking on one of button. Even if I implement OVRTouchpad.TouchHandler event and handle swipe manually. It still process clicks which is annoying. Am I doing anything wrong?
EDIT :
I can see following code in the script but these variables are not used anywhere else.#region GearVR swipe scrollprivate Vector2 swipeStartPos;private Vector2 unusedSwipe;#endregion - infinite360vrExplorerIf I am using older version of script, is there any repository where I can find newer/updated version of OVRInputModule?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device