Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

3d gui?

Discussion in 'Immediate Mode GUI (IMGUI)' started by LaneFox, Jul 2, 2011.

  1. LaneFox


    Jun 29, 2011
    I'm thinking I'm going to want a 3d gui in my game and i've been looking around only to find limited information on this topic.

    This thread was helpful and put me on the right track and there seems to be a couple of options in there... But basically I want to create a GUI 3d Object and make it interactive. The player should be able to move special abilities around on a functional bar, he needs to be able to click items and all that good stuff.

    The idea I would like to use is putting the gui into a maybe a prefab(will that work?) and have a HUDCamera viewing it, then instance everything HUDCamera sees on the GUI layer and reflect it into the players' GameCamera.

    I just got Unity working last week and don't have any programming experience so these ideas are kinda hard to convey technically. I intend to make a bunch of 3d environments in space stations where you can buy items and drag-n-drop things onto your ship and I don't want to lose touch with that 3d feel when you go back to the spaceship RTS style view.

    Things I'm worried about are is mouse areas - if you're doing something on the GUI then you are not doing anything on the game scene, otherwise since moving is controlled by right clicking and holding it down I'm worried i'll get overlapping commands in different camera instances. What if a player clicks an attack button? Is it going to drag that functionality into the Game view so the player can click something? Same concern with Abilities, they need a target.The other thing is resolution adjustments, I'm hoping the HUDCamera will not be affected by this and the GUI will apear exactly the same in any resolution.

    Will this work?
    If it does not work, do I have any alternatives to achieve a 3D GUI?
    Where do I start with implementation?
    Can I use a prefab and let the user still make changes to the GUI?? I intend to make this into a multiplayer game, each player will need a unique GUI to reflect health/shield impacts and his own personal customizations to the GUI.

  2. U7Games


    May 21, 2011
    i´m not sure if this is what you want to, but 3d gui, it comes to my mind to create 3d objects and parent them to the camera, rendered by a second camera, with a minor depth.... maybe i´m wrong :)