Triangle shape made of spheres

Does anybody know how to make a triangle shape based on this example (just instead of square shape, would be great to have a triangle form like a small mountain. All the rest work fine.)

hey sorry for late
look this sample that is not sphere but can help you

1 Like

Cool, it seems even better than I was planing :slight_smile:
I have never worked with GeometryBuilder, so I am trying to get an idea from your code. Just one thing: I tried to add a GUI Slider but I am wondering how to change the value. Here is the example that I wanna to follow
So to build the “mountain” that you created, what can I implement on slider.onValueChangedObservable.add function?

The Math is way off and will only work for a stack of 5 currently… If I had more time Id do the real calculations for you but this should get you on the path I would imagine.



yuuup! that looks amazing :wink:

The height calculation could be messed with… I got lazy and just did the radius*0.65… what is really needed is a hexagonal circle stacking offset for those ones and I forget the value for it…