HUD hides behind other objects


i have a little Problem with my HUD.

Everything works well, except sometimes my HUD hides behind another Object,  like in the Screenshot, although the HUD is rendered in Ortho-Mode.

Here is some Code how i create my HUD:

Quad dataBg = new Quad("hud", 236f, 100f);
      dataBg.setLocalTranslation(new Vector3f(118,50,0));

bs is just some BlendState and this.attachChild(dataBg); attaches the quad to a node, that is attached to the rootNode. So it's not directly attached to the rootNode. Is this a mistake?

Do you have an Idea what I'm doing wrong?

This has to do with the minimum z-depth that the camera displays. I think you can avoid it by setting the setFrustumNear() value of the camera. I had this problem as well and dug into that a bit, its about camera settings, that much I can say for sure :slight_smile:


Thanks for your help.

I solved this Problem with replacing this line:

dataBg.setLocalTranslation(new Vector3f(118,50,0));

with this one:

dataBg.setLocalTranslation(new Vector3f(118,50,1));

But now I got another Problem.
I'm currently trying to add a Weapon to the HUD.
So i got this model:

As u can see, the model looks right, but if I add this to the HUD and set RenderQueue to Ortho it looks like this:

And here is the Code how i add the Weapon to the HUD:

URL ninjaUrl = new File("player/paintballGun.jme").toURI().toURL();
         Node weapon = ModelCache.getInstance().getModel(ninjaUrl);
         Quaternion rot = new Quaternion();
         rot.fromAngleAxis(FastMath.DEG_TO_RAD * 90, Vector3f.UNIT_Y);
         weapon.setLocalTranslation(new Vector3f(
               Game.getGame().getDisplay().getWidth()/2 + 250,


ModelCache.getInstance().getModel(ninjaUrl); just returns a Node with the Model in it.

What am i doing wrong?