Fixed Size UI elements that are Attached to Mesh

How do I prevent these elements from scaling with the camera moving in and out?

https://www.babylonjs-playground.com/#XCPP9Y#20

If its not “Possible” is there a way to hack it if I have an orthographic camera that’s “zoom” is its z position?

Otherwise I will have to move to using planes with a dynamic texture.

I am not seeing them scaling in your PG ?

image

I might have misunderstood the question

Oh, I guess I should reverse what I am saying. I want them to stay the same size effectively in relation to the mesh they are attached to.

In this case you might look into not creating the gui or layer used for the gui full screen:

https://www.babylonjs-playground.com/#ZI9AK7#1

https://doc.babylonjs.com/how_to/gui#advanceddynamictexture

1 Like