# UV mapping AdvancedDynamicTexture on Plane?

**URL:** <https://forum.babylonjs.com/t/uv-mapping-advanceddynamictexture-on-plane/2646>\
**Category:** Questions\
**Created:** [April 17, 2019, 2:40pm UTC](https://forum.babylonjs.com/t/uv-mapping-advanceddynamictexture-on-plane/2646 "2019-04-17T14:40:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agint](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@Agint](https://forum.babylonjs.com/u/Agint)\
**Post date:** [April 17, 2019, 2:40pm UTC](https://forum.babylonjs.com/t/uv-mapping-advanceddynamictexture-on-plane/2646/1 "2019-04-17T14:40:49Z")

</div>

I am trying to make these planes with dynamic text on it which I can scatter around in my scene as labels on different objects.

Testproject:  
[https://playground.babylonjs.com/#L3Z2EJ#3](https://playground.babylonjs.com/#L3Z2EJ#3)

My problem is that I don’t understand how I can make the AdvancedDynamicTexture behave, so I can properly align the text on the plane, and not let it get squished in the height/width if the plane is not exactly rectangular.

Maybe I am going about this in the completely wrong way, I am not sure, but I really like the power of the easy runtime modification of the TextBlock element.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 17, 2019, 4:59pm UTC](https://forum.babylonjs.com/t/uv-mapping-advanceddynamictexture-on-plane/2646/2 "2019-04-17T16:59:44Z")

</div>

Hello and welcome!!  
The idea is to adapt your texture to the ratio of your plane:  
[https://playground.babylonjs.com/#L3Z2EJ#5](https://playground.babylonjs.com/#L3Z2EJ#5)

---

<div class="post-metadata">

**Author:** ![Agint](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@Agint](https://forum.babylonjs.com/u/Agint)\
**Post date:** [April 17, 2019, 6:20pm UTC](https://forum.babylonjs.com/t/uv-mapping-advanceddynamictexture-on-plane/2646/3 "2019-04-17T18:20:34Z")

</div>

Thank you!

It didn’t occur to me to look there. After your answer, the alignment properties now works natural with:

_text.textHorizontalAlignment = BABYLON.GUI.Control.HORIZONTAL\_ALIGNMENT\_LEFT;_  
_text.textVerticalAlignment = BABYLON.GUI.Control.VERTICAL\_ALIGNMENT\_TOP;_
