AdvancedDynamicTexture.CreateForMesh rotate with camera

Hello. I was browsing through the docs and playgrounds, but couldn’t find anything like it.

I am using AdvancedDynamicTexture.CreateFullscreenUI for my meshes (like here), this is perfect with one exception. When I zoom in or out, the GUI won’t get resized.

When using AdvancedDynamicTexture.CreateForMesh, the GUI (e.g. above the mesh) will look like it is part of the mesh (zooming out and zooming in should kinda resizes the GUI) like here.

So basically I am looking for a mixture of those two. The GUI should always face the activeCamera and when zooming in or out it should resize the GUI according to match the proportions of the mesh in all zooming positions.

Does anybody have a clue how to achieve this? Any help is appreciated.

Seems like you want a fullscreen and just overload some functions for when the camera zooms. When that happens you could scale up the size of the guis.


You can used CreateForMesh and have that mesh just always face the camera. :thinking: Yea I like that better! Let me see if I can get a playground up. (Unless someone beats me to it)

sounds like you want “billboardMode = all” on the mesh?


Ya that works :joy: :

1 Like

Thanks for your answers. @aWeirdo this seems to be exactly the thing I wanted to achieve, thanks a lot. I think this would be a great fit for the docs (The Babylon GUI | Babylon.js Documentation) (just don’t know where the dedicated GitHub repo is)

EDIT: Just found the repo