Map world space into screen pixel units

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
use 256px for have optimization


@nasimiasl is there a node package for the Shader builder library that is being loaded using cdn?

the typescript version exist in BABYLON Extension

for use shaderBuilder you just need add
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 :slight_smile: my dear shader Builder always be hide :frowning:

@nasimiasl that last playground without shaderBuilder seems not to render scene.

1 Like