Create a sphere gizmo, how to get the size?

Hi,

I would like to do a gizmo of a sphere. Just to click on it. I was checking all the Gizmo BabylonJs code, and I don’t find where it gets the size. :slight_smile:

I want the sphere has the same size as the arrow in the axisDragGizmo. I was thinking to get the camera distance or try to find the pixel size, but I don’t know if it the best approach.

Any idea?

Thank you!

Pinging @Cedric the “Gizmo King” to help

1 Like

Hi @Rafael

That’s done here in the gizmo :

The scaling only depends on the distance to the camera.

Thank you! :slight_smile:

1 Like

Hi guys!

You answers help me a lot! Now I create just a Clicking gizmos!

The idea is you click on it, and it will enable/disable another thing, like another gizmos!

I’m adding a lot of things based on Babylonjs, in gizmos and other areas. I would like to share that with the community, because you always are helping me. I’m developing software for 25 years, but never a participate in an Open Source project, and I would like to collaborate in BabylonJS.

Do you have like a Guide, TODO list of something I can start to help?

Thank you guys!

Rafa

We do have a guide:)
https://doc.babylonjs.com/how_to/how_to_start

Wow! Supercool guide! :slight_smile: Thank you!

1 Like