unity-triangulation2D icon indicating copy to clipboard operation
unity-triangulation2D copied to clipboard

can't create mesh with reversed faces

Open 22andrew22 opened this issue 7 years ago • 1 comments

I've created the first polygon with polygon = Polygon2D.Contour (pointlist.ToArray()); triangulation = new Triangulation2D (polygon, threshold); go = Instantiate(prefab); go.GetComponent<DemoMesh>().SetTriangulation(triangulation);

However, when i feed polygon with a reversed pointlist, i get a polygon with the same face. Whats the correct way to do this without a custom shader as was done in the demo?

22andrew22 avatar Oct 29 '18 01:10 22andrew22

One way of fixing this is to reverse the normals. Here's a script that does this, though I haven't used it.

psmaAaron avatar Dec 12 '18 23:12 psmaAaron