I’ve done some searching and have come across some examples of how people got text in their scenes (e.g., I’m looking to label some of my models), but the examples I find are too old. Is there a tutorial or example somewhere of rendering text within a scene (NOTE: not HUD text!) that is geared towards JME3?
Ok, I got some of this figured out, and I know have text rendering in the scene:
[java]
BitmapFont font = assetManager.loadFont(“Interface/Fonts/Default.fnt”);
BitmapText helloText = new BitmapText(font, false);
helloText.setSize(font.getCharSet().getRenderedSize());
helloText.setText(“Hello World”);
helloText.setLocalTranslation(0, helloText.getLineHeight(), 0);
helloText.setQueueBucket(Bucket.Inherit);
rootNode.attachChild(helloText);
[/java]
Still have some things to figure out… but at least I’m on the right track now.
Does the above code make sense? I mean, it renders, but I can’t control the color of the text nor the background color. So it’s just white text on black boxes right now.