2D Text with Billboard Control

Hey guys im testing about 2D text in a 3D scene with Billboard control. The problem is that i cant see the text at all, it was working fine with the GUI node but for billboard, you’re supposed to attach it to a Node.

//This is my UI class
dmgFont = assetManager.loadFont(“Interface/Fonts/Arial.fnt”);
dmgAmount = new BitmapText(dmgFont, false);

    dmgAmount().setBox(new Rectangle(-dmgAmount.getLineWidth() / 2.0f , 0f, dmgAmount.getLineWidth() +20,       dmgAmount.getLineHeight()));

//In my Game class
ui = new UI(this, this.app.getAssetManager());

text = new BillboardControl();

    textNode = new Node("Node for text");



Once again the problem is that i cannot see my text at all, i could see before if i use GuiNode.

Oops, i forgot textNode.setLocalTranslation. I put that in as well and still doesnt work.

Do you see it if you don’t add the billboard control?

@pspeed said: Do you see it if you don't add the billboard control?

If i remove the billboard control i still don’t see it.

Well, keep simplifying until you do see it, I guess.

Keep in mind, your test will be 30 meters tall with the above settings. Maybe you are looking at the lower corner of it and don’t realize.

If you can fly around, fly around and see if you are looking at the back of it.

If all that fails, try to make a simple test case with nothing but JME code.

I fixed it, some previous code was interfering.