Skip to main content
Up and Coming
August 2, 2013

WHY !! Gui elements only visible in one eye ??

I have noticed all of my Gui elements only render to one camera. Why & how can I rectify this ??

I'm hoping there's a simple function in the SDK or a tag I can apply that will duplicate them automatically over so they're visible in both Left & Right cameras ?
    This topic has been closed for replies.

    27 replies

    Up and Coming
    October 31, 2013
    This seems to be a common problem, so I created a package that will hopefully simplify the process for people:

    https://developer.oculusvr.com/forums/viewtopic.php?f=37&t=4944
    New Participant
    November 12, 2013
    Hello everyone,
    I read the couple threads about GUI on this forum but I still can't figure out a solution to my problem.
    I want to display a Gui box while my mouse pointer is over a gameobject. And here's what I did so far:
    Since the infos are object specific I thought about creating a script with the infos per object.
    Drawing a box or a stereobox ended up displayed on the left camera only.

    I then tried to duplicate what was done in OVRMainMenu but in the end my limited knowledge of unity prevents me from accessing the instantiated plane created in front of OVRCameraController.

    So my first question is: is it possible? is there a better way?
    And if so, somebody care to explain the reasoning with a basic example?

    Thanks.
    Inspiring
    November 12, 2013
    You need to make the GUI a 3D object in the scene. For example, you'd use a flat quad that is aligned to the camera controller position (i.e. a billboard). Then on this quad you would render the GUI as a render-to-texture (not to the screen directly). I am not 100% sure the exact steps needed to do this in Unity, but that is the general idea.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    New Participant
    November 13, 2013
    Thank you for your answer.
    Yes, that's what I understood so far. I followed sinoth's example but couldn't get it to work and yet following unity's doc on rendertexture (camera drawing on a RT) worked flawlessly. I think I understood the the main ideas to achieve what I want but still miss the little steps in between.
    I solved my problem by raycasting from my camera and using the already instantiated RT from OVRMainMenu instead of using OnMouseOver. It works, kind of, since the mouse is giving me trouble now but at least I got something.

    I'm still open to suggestions though!
    Up and Coming
    April 21, 2014
    "Krisper" wrote:
    Once thing I notice is that while the GUI is showing, if I move around the text disappears until I stop moving. Anyone know why this happens and how to stop it?


    Did you ever solve this? I'm having the same thing. I think it's possible that it's struggling to maintain 60 fps, so it starts to skip things that are less interesting (somehow) and therefore skips the rendertexture bit.
    Up and Coming
    April 22, 2014
    I did something like this before. I was still having issues the other day when I tried this but this should work the same with NGUI and Daikon forge in Unity for anyone needed help.

    https://www.youtube.com/watch?v=_GP7lpOPcFc
    Up and Coming
    April 23, 2014
    "xhonzi" wrote:
    "Krisper" wrote:
    Once thing I notice is that while the GUI is showing, if I move around the text disappears until I stop moving. Anyone know why this happens and how to stop it?


    Did you ever solve this? I'm having the same thing. I think it's possible that it's struggling to maintain 60 fps, so it starts to skip things that are less interesting (somehow) and therefore skips the rendertexture bit.


    Actually, I think it's GL.clear that's getting called more frequently than the GUI is getting drawn. Not sure how that is since they're both supposed to happen once per frame.