good day,
I have a 3d model loaded in babylon.js
I just want to put a simple text label somewhere in the 3d space, say coordinates x,y,z
I find examples to put buttons, panels, etc, but I just want the text by itself, how can I do that?
Also using an example of a panel+text, the panel appeared but the text didn’t, do I need to do anything else to make text appear?
thank you
I have tried this
var advancedTexture = GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
var text1 = new GUI.TextBlock();
text1.text = "Hello world";
text1.color = "white";
text1.fontSize = 2400;
text1.position = new Vector3(0, 300, -50);
advancedTexture.addControl(text1);
but text doesnt appear and furthermore then I get this error in console
BJS - [10:06:41]: Unable to load from ./models/b7/b7.babylon: Error in onSuccess callback
error that disappears if I take the text code away
You should setup a repro in the playground (https://playground.babylonjs.com/) for us to be able to help.
This doc can help you hosting your asset: Using External Assets In the Playground | Babylon.js Documentation
1 Like
yes thank you, its here
i see text, but i have to now get rid of button and panel to have just floating label in 3d world