So I’ve made some changes and progress.
I’m not using labels anymore but rather a gui which I made stick with the card go by following the GUI follows GO example by @britzl. It’s working fine, but I am still facing the same issue : the GUI is rendered on top of everything else, causing some weird overlap between cards.
I created a custom card_gui.material
with a card_gui tag, which I set correctly in the material property of my GUI. The weird thing is that material seems to be completely ignored…
I added in my custom.render_script
a predicate in my init function:
self.card_gui_pred = render.predicate({"card_gui"})
And then the render.draw function in the update function:
render.draw(self.tile_pred)
render.draw(self.card_gui_pred)
But as I said, this does nothing and my GUI still seems to use the normal gui material. I tried to comment the render.draw(self.gui_pred)
to be sure and it indeed made the gui disappeared.
Sorry about the long posts guys, but I’m really trying to understand!