Static Text to show Length of Object

Hey guys,

i looking for Static text, which i can place with x / y / z and also the Size and only OPTIONAL background.

At the moment i only find drawText which only works with Background and i don’t understand how to place the text in the plane like i want … :frowning:

And it should not follow the camera

do you have a other function which i can use?

If it’s with GUI than i need more explain 'cause when i try to include GUI i get Errors in the Console…

I hope you can Help me.

(Here my current Code how i place Text)

function createText(text, x, y, z, scene)
var outputplane = BABYLON.Mesh.CreatePlane(“outputplane”, 25, scene, false);
outputplane.billboardMode = BABYLON.AbstractMesh.BILLBOARDMODE_ALL;
outputplane.material = new BABYLON.StandardMaterial(“outputplane”, scene);
outputplane.position = new BABYLON.Vector3(x, y, z);
outputplane.scaling.y = 0.4
var outputplaneTexture = new BABYLON.DynamicTexture(“dynamic texture”, 256, scene, true);
outputplane.material.diffuseTexture = outputplaneTexture;
outputplane.material.backFaceCulling = false;
outputplaneTexture.drawText(text, null, 150, “bold 60px verdana”, “black”, “RGBA(255,255,255, 0.5)”);

Thank you,

Hi @Rotzend and welcome to the forum. Here are some useful links, ask again if you still have issues and remember linking to a playground with your code helps us help you .

Feel free to experiment with any of the playgrounds in the solutions of the above topics, you cannot overwrite any existing playground. Saving your experiments will just produce a new playground.

Thank you very much!

with the second Post i’ve found what i’m looking for!

And okay now i know, the next time i try the Playground! :slight_smile:


1 Like