Change plane height

hello ,

i’m using plane , rectangle and text like that :
const plane = BABYLON.Mesh.CreatePlane(“text”, 50, scene);
const advancedTexturetext = GUI.AdvancedDynamicTexture.CreateForMesh(plane, toNumbers(this.width)[0], toNumbers(this.height)[0]);

const rectangle = new GUI.Rectangle();
advancedTexturetext.addControl(rectangle);

const text = new GUI.TextBlock();

any help please for change plane height at runtime ?

thanks for help :slight_smile:

The easiest way is to use the scaling property:

plane.scaling = new BABYLON.Vector3(scale_x, scale_y, scale_z);

2 Likes

thanks a lot @Evgeni_Popov :slight_smile:

Is there any other way? I need to guarantee the default zoom ratio of 1

You can directly update the vertex coordinates, but the end-result will still be the same than using scaling in the first place.

Maybe providing a PG will help to better understand what you want to achieve?

I see. Use updateVerticesData