I am trying to create a HUD with hearts. But when I try to set the hearts to turn invisible, they never do. I’ve tried the Visibility Actuator through Python, the setVisible() module, the setVisibility() module, even bpy.hide_render(), everything under the sun, to no avail. I have even tested setting a floor to invisible and that works, so why can’t an overlay collection do it?
Even scene.objects cannot turn the health objects invisible with the visible and setVisible() modules!
My HUD is set so it comes up whenever the player receives something and the HUD will appear (turn visible) via the Collection Actuator. The HUD will turn invisible after a few seconds via a Timer property through another Collection Actuator.
Hello, I’ve tried and it works for me, here’s a test file, It is made in UPBGE 0.36.
I don’t call the actuator, instead I use “.visible” directly from the object.
For objects that refuse to turn invisible, you can create another object, assign a completely transparent material, and then use an Edit Object → Replace Mesh (GFX) to replace the visible mesh with the invisible one. Make sure to switch it back to the visible one when you want it to.