Rendering edges of a cylinder

I’m pretty new to babylonjs, so first thanks for all the great work you’ve done : )

I wanna draw a hexagon and display its outline. Here’s an example using createCylinder :

I tried with enableEdges Rendering, but there is a “red line” going from an edge to center of hexagon : /
What I’m doing wrong ? Is there any way to display only outline ?


Hi @gabriel ,

Have you tried renderOutline?

That looks great ! Thank you.
Is there anyway to render outline for each face ? I wanna have outline around top face.

1 Like

It should be possible to define submeshes and render only their outline, but when seen from the side, flat faces show no outline.

For your original question, apparently setting the checkVerticesInsteadOfIndices of enableEdgesRendering works for the cylinder, perhaps it will work for the hexagon as well:

That looks fine to me. Thanks a lot !

Le ven. 8 nov. 2019 à 18:16, Gijs Schenk via Babylon.js a écrit :