Hi there,
i’ve an issue with GUI and control’s padding.
I’ve made a textblock inside a rectangle for transparency purpouse: all work fine but i’ve a problem when i use control’s padding.
This is my PG: https://playground.babylonjs.com/#2YVEPB#1
As you can see i try to set the position of the control bottom-right, but if i change the paddingBottom parameter it doesn’t behave like espected. Forthermore, it seems to change the control dimension (you can try changing r.paddingBottom = value).
What could be the problem?
Thanks
The padding values are paddings between the control and its parent, but they are setup so that the final width/height of the control is unchanged. So, if control height = 100px and you have padding top and bottom = 20px, then the usable height of your control is 60px.
As your height is in pct, you should use a paddingBottom in pct too but with a smaller value, like 5% for eg:
Thank you very much,
so, if I’ve anderstood, the issue is that it’s not possible to mix different units for sizes: if I define a dimension in pct I always have to use it in pct, is it right?