Hi guys, this is driving me crazy. I’m trying to add a BitmapText to a node (not guiNode) so that every trasformation to the parent node reflects on the text. My code goes more or less like this:
textNode = new Node();
text = new BitmapText(...);
// setting up text (size, color, text, translation...)
textNode.attachChild(text);
rootNode.attachChild(textNode);
This doesn’t work. I read of BillboardControl and tryied to use it but with no outcome. What’s wrong with my code? Thank you for your attention.
Nothing happens. I’d expect the text to show up at the center of the screen but it doesn’t. Everything is ok if I attach the text to the guiNode and follow the “standard procedure” to update its position when needed, but having the text attached to some other node would make things way easier.
Unfortunately, the screenshot would just be a black screen.
Yep, your text is most likely simply behind the camera, turned the wrong way, super huge or super small. If the coords and sizes work in the gui node (which has pixel units) they most certainly won’t work in the scene (which has world units).
Yep, text is in x/y plane, too… so using the billboard control without rotating it properly under the billboarded node only makes sure you will never see it.
You were right guys, it was super huge. On top of that, i was scaling it to double its size because I thought it was too small to be seen… lol Thank you for your replies anyway
Texts have this awkward black background. I’ve never seen such a thing so far and I can’t spot out why it is so. Any idea why it happens? I don’t know what code I should paste exactly so let me know.
Since it’s transparent… put it in the transparent bucket. And/or search the forum for “text with black background” as I’m sure this is asked periodically and definitely within the last week.