Hey, Im trying to create plane where the text on the plane is defined by a user input (text). The width of the plane/ADT is fixed but the height should be calculated based on the length of the user input. Here is a playground with what i have made so far: https://playground.babylonjs.com/#XTYXH3#1 . If you have any good ideas/input for how this could be achieved, its very much appriated. Thank you
Hi there. Let’s see what I can do for you
I got you! Now one thing to note is you will want to also play with the render scale to scale the texture to the new size of the plane. But you can adjust based on what youd like the defaults to be.
Fun fact this is how I do it in the upcoming GUI editor
thanks for the quick response In your PG its only possible to have a single line and the font becomes stretched. In my case i need multiple lines so i dont think an inputText gui element is the right thing here?
You just add multiple lines or just using textBlock. Full list of controls can be found here:
The stretch comes from the render scale. The advance texture is being mapped onto a stretching mesh so you’ll need to calculate any updates.