unity-triangulation2D
unity-triangulation2D copied to clipboard
can't create mesh with reversed faces
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?
One way of fixing this is to reverse the normals. Here's a script that does this, though I haven't used it.