- Home /
gui or 3d model for hud ?
I am making a game and I m confused on making HUD. For my menu I used 3d models and animation but confused on HUD. Should I use unity's gui system to make HUD or even I can make using 3d model. How can I use 3d model as HUD. If I use model then how can I make stick at the top always? Any tips or link to any tutorial..
You can simple place it really close to the camera. You could even have a separate camera which only views the HUD.
I'd use GUI.
It is likely that a majority of significant mobile games use world objects for their HUDs and other UI elements. World objects combined with a texture atlas can reduce the HUD or possibly all the UI to a single draw call. Without a texture atlas, which method (GUI, GUITexture, world Quad) is less clear, and each element produces a single draw call. All have their strengths and issues. As for keeping the 3D model at the top of the screen, you can just parent the model to the camera. But usually it is done as @meat5000 suggests, by using a second camera and placing the HUD elements on their own layer only seen by this second camera. Getting the second camera setup right is a bit fussy, but the steps have been outline on UA many times.
Answer by Mmmpies · Aug 03, 2014 at 06:51 PM
Just done something very similar but using DFGUI and went with a background GUI with 3D floating on top. Daikon Forge doesn't naturally support 3D if you only have Unity free like me (or indie if you prefer that name) but I found the standard OnGUI massively slows framerate. In fact I got better framerates with 3D objects rotating in the "chest" screen than with OnGUI and simple text icon.
Whatever you're using though this tutorial on using an additional camera for displaying 3D object above a 2D menu will help you.
http://www.41post.com/3255/programming/unity3d-creating-a-gui-with-both-3d-and-2d-elements
No problem, I've got NGUI as well (when it was on 24 hour sale) but not got round to using it yet. Seen loads of people saying DFGUI is more structured and not as messy as NGUI so I went with that. That said, I just advised you to add an extra camera and scripts which is exactly why people say NGUI is messy, so just go with whatever works for you :¬)
Your answer
![](https://koobas.hobune.stream/wayback/20220613155718im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
[SOLVED] HUD ammo counter showing up only when a bullet is fired 0 Answers
Render Sprite on Screen at 3d game 0 Answers
A GUI menu solution 0 Answers
Where to learn GUI ? 2 Answers
Raycasting and GUI 0 Answers