joshcamas Posted October 7, 2018 Share Posted October 7, 2018 Hello friends When attaching to a mesh, babylon's GUI scale and ratio is dependent on the mesh's ratio. This is fine, unless you have a dynamic GUI in which you don't know the exact ratio of the GUI you'll be building. This causes issues: https://www.babylonjs-playground.com/#0U0RKU#2 My idea is to dynamically scale the mesh after the GUI is finished - by defining either the width or the height of the mesh, and then calculate the corresponding height or width depending on the GUI's aspect ratio. Problem is, I can't seem to find this aspect ratio. I've tried grabbing the dimensions of the root container, but they return 0. Also, the AdvancedDynamicTexture's resolution is defined before the GUI can be created, thus creating another aspect ratio problem Any thoughts? I feel like I'm missing an obvious solution here xD Josh Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.