HUD disappears when cam look around

Hi all,



I’ve a very big porblem with my HUD. I have a HUD with a text, created with an BufferedImage. If I now load the scene my HUD is only showing when my cam looks in certain positions. I load my HUD on the same way as in the past with “normal” textures and can’t find out where my problem is. Maybe any other had the same problem too?



[java]

BufferedImage img = getImage(scales);

float w = img.getWidth() * scales.x;

float h = img.getHeight() * scales.y;

float factor = height / h;

Quad ret=null;



ret = new Quad(“textLabel2d”, (7*text.length())height,20height); //w * factor , h * factor

ret.setRenderQueueMode(Renderer.QUEUE_ORTHO);



TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();

Texture tex = TextureManager.loadTexture(img, Texture.MinificationFilter.BilinearNoMipMaps, Texture.MagnificationFilter.Bilinear, true);

ts.setTexture(tex);

ts.setEnabled(true);

ret.setRenderState(ts);



BlendState as = DisplaySystem.getDisplaySystem().getRenderer().createBlendState();

as.setBlendEnabled(true);

as.setTestEnabled(true);

as.setTestFunction(TestFunction.GreaterThan);

as.setEnabled(true);

ret.setRenderState(as);



ret.setLightCombineMode(LightCombineMode.Off);

ret.setModelBound(new BoundingBox());

ret.updateModelBound();

ret.updateRenderState();

[/java]

ok, I’m going crazy.



It doesn’t matter what a texture is used for the quad. It’s at all.



I found out, that the HUD is show when I look at the position I give the Quad. For Example I make quad.setLocalTranslation(500,500,0) it will only be on my screen if my cam looks at Worldposition 500,500,0.



Has somebody an idea? I compare my code with other code from me, where the HUD is normal but I can’t find a difference.



greetz



Bastard

I’ve got the same problems with my textures…

I didn’t found a right solution for the problem but maybe another way to realize this. I put the hudstuff in an own RenderPass and then it goes.