Search Unity

Question Camera Stacking and layers

Discussion in 'VR' started by tleylan, Jan 6, 2023.

  1. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    621
    In a VR app I added camera stacking so that my player pop-up UI menu appears in front of the landscape but there seems to be one issue. If I raise my avatar's hand I can see thru it and see the buttons on the UI menu. Ideally (I think) I would like the UI menu to be in front of everything in the room with the exception of my avatar and I suppose things my avatar might be holding.

    Does this involve another camera? Some ordering of layer's or something else entirely?
    Thanks.

    I posted this some time back in Getting Started and while there were views there were no answers. I don't know how to move the thread and I would love to find the answer. If this is bad form would someone explain how I delete the other one or move the other one?
     
  2. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    74
    So are you saying the hands are rendering as part of the main scene? If so, then yes, it seems like a camera just for the hands to render in front of the UI would be something to try out. Just know that then you might have issues with occlusion between the environment and the hands depending on how close the environment can render.
     
  3. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    621
    Thanks so much for the reply. Yes. The intention was to make the UI menu render in front of things such as walls, or desks and stuff in the room (which it now does) but it renders in front of the hands of the avatar also. I don't quite know about part of the main scene though. The avatars are separate game objects set up with a camera, audio and needed stuff PLUS each avatar has within it a personal UI. That UI is designed for the room and is swapped into the avatar as a player joins the room.

    I would expect to see the hands render on top of the menu and UI elements. It works but it looks odd.