I’ve just started programming with the Babylon Framework and have already gotten into a problem:
How do I close the extrusion I create with ExtrudeShapeCustom?
An example should illustrate this: https://www.babylonjs-playground.com/#QBC29E.
The triangle will later be replaced with different shapes. The path should be extruded closed.
What do I have to adjust or add to make this work?
I already tried to close the triangle extrusion, which is why I assumed the triangles were extruding from an axis not in the center of the triangle. But if it is extruding from the center, I’m not certain how to close the extrusion in his playground scene.
That said, if you really want to close an extruded circular shape, you may consider build your own ribbon around a a set of (three) circular paths because there’s quite no chance that the extrusion process sets the first step of the shape (your triangle) in a radial orientation to your circular path.
What I would do then ?
Build 3 arrays of vertices, each defining a circle parallel to the others, all having the same rotation axis. Then build a ribbon on these 3 arrays and close it. You then be sure that every step (triangle) will be radial to the circle.