meteoritool Posted December 17, 2015 Share Posted December 17, 2015 Hi, I am using bGUI extension to create a nice User Interface.It has several panels made of .png images with transparency. Everything works perfect, but when bGUI panels are on-top of each others, the rendering order looks random : some images are on top of others, some are behind, without logic. Those bGUIPanel acts as buttons, and using "guiposition()" z position allows to control the hierarchy of z "touchability", but the way they are displayed doesn't match "graphically". Is there a way I can control the z order of images ? I've tried to add bGUIPanel.mesh.position.z = 2;after "bGUIPanel.guiposition()" but this doesn't seem to change ... Thx for your advice ! Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 17, 2015 Share Posted December 17, 2015 It's a known bug... Try to use bGUIPanel.mesh.position.z = 20000000; or another big value I don't know yet why it act like this... Quote Link to comment Share on other sites More sharing options...
meteoritool Posted December 18, 2015 Author Share Posted December 18, 2015 Thx for your help Temechon !I like what you did with bGUI a lot, it is very simple and efficient ! I've tried your solution : bGUIPanel.mesh.position.z = 20000000; but it makes the panel disappear ... So there's something going on with the z.index, but not quite what I expected ... I didn't explored more into it, because I randomly found another topic on this forum: http://www.html5gamedevs.com/topic/19310-mesh-display-on-top/ that solves the problem ! So the solution is : if you have several bGUIObjects on top of each others, in order to control the z-index, you have to add :bGUIObject.mesh.renderingGroupId = x; It adds a bit of code to every object, but it works :-) Hope it will help others too ;-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.