Render of simple gemotery with ExtrudePolygon create strange result

Hello,
i have a simple geometry in this PG created with extrude polygon:

https://playground.babylonjs.com/#7JLZJT#1

the result should be like this image

but in this case

image

i see that with same geometry but with vertex rotated create a complete different result, in many case broken

iā€™ d like to understand which is the best way to pass vertex to babylon

i have many ExtrudePolygon and often the render is broken

Maybe this doc can help: Irregular Polygon Extrusion | Babylon.js Documentation

Notably:

All vectors for shape and holes are Vector3 and should be in the xz plane, ie of
 the form BABYLON.Vector3(x, 0, z) and in counter clockwise order;

In your PG, your problem is myShapeInner.reverse();

1 Like