Hi!
How can I adjust a model’s z-ordering so that I can position it on top of everything else, including the HUD (Gui)?
Thanks!
ps: Yes, I am aware of all my questions! Applaus to y’all!
Hi!
How can I adjust a model’s z-ordering so that I can position it on top of everything else, including the HUD (Gui)?
Thanks!
ps: Yes, I am aware of all my questions! Applaus to y’all!
I think you’d have to use another camera to do that.
–Eric
Yup, Eric is right. You have one camera that renders your “background” layer (your GUI) layer and another that renders the “foreground” layer (your model). Of course this means you’ll need to create the layers, then assign the model to the “foreground” layer and the GUI elements to the “background” layer. Lastly set each camera’s culling mask to the layer it should show, and then the “foreground” camera’s clear flags to depth only.
To go a step further, you could then have more layers, like more GUI elements on top of all that, just use a third camera and a third layer and go from there…
Thank you guys, this community is awesome!! It worked.
Hi sir I have an issue …In my scene there are 2 camera one is showing GUI and other one is showing the game. When I pause the game then pause panel come in front of the Gui camera , and as Gui Camera have higher depth so pause panel displayed above the all the other things rendered by the main camera. But when I add a 3d model to the scene which is in enemy layer, which is rendered by the main camera , in that case on pausing the game, models are rendered above the gui elements which is displayed by the GuI camera whose depth is 0 and main camera depth is -1.