Is there a way to grab how many pixels of screen size a mesh is taking up in terms of width and height. I want to create a circular menu that is revealed by clicking on the mesh. Each mesh can vary in size and therefore i’ll need to know the width and height of the mesh in terms of pixels.
I think the best option is to project the bounding info on the screen with Vecotr3.Project API
https://www.babylonjs-playground.com/#JFW56V#11
use 256px for have optimization
https://www.babylonjs-playground.com/#JFW56V#12
3 Likes
hi
the typescript version exist in BABYLON Extension
for use shaderBuilder you just need add
BABYLONX.ShaderBuilder.InitializeEngine();
before you use
and in this example that just make Color Uniq ID
i can change the code and write this example without shaderBuilder too if you want
code without shaderBuilder my dear shader Builder always be hide
https://www.babylonjs-playground.com/#JFW56V#21