[SOLVED] Attach Quad to guiNode

Hi mokeys,

I would like to add a quad to the guiNode. I found an old threads about it but it does not say how to actually resolve the issue. Here the code I use:

[java]Geometry quad = new Geometry(“Quad”, new Quad(5f, 5f));

Material mat1 = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

mat1.setTexture(“ColorMap”, assetManager.loadTexture(“Textures/water_test.png”));

mat1.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);

quad.setQueueBucket(Bucket.Transparent);

quad.setMaterial(mat1);

quad.setCullHint(CullHint.Never);

quad.setLocalTranslation(10, 10, 0.5f);

guiNode.attachChild(quad);[/java]



With this code I can see nothing and I really don’t know where to bang my head.

Thanks in advance for any hints! :wink:

See the example TestOrtho

Remove this line:

quad.setQueueBucket(Bucket.Transparent);



…and it should work. In the guiNode switching buckets isn’t necessary to get transparency.

1 Like

Thanks guys. pspeed solution works perfectly. :slight_smile: