Rendering edges of a cylinder

Hi
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 :https://www.babylonjs-playground.com/#CWPN2T#150

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 ?

Thanks

Hi @gabriel ,

Have you tried renderOutline?

https://www.babylonjs-playground.com/#CWPN2T#152

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:

https://www.babylonjs-playground.com/#CWPN2T#153

That looks fine to me. Thanks a lot !

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