Normals are only for lighting calculations. As it is, your code just tells the faces to behave, when hit by lights, to act as if they were facing the other way.
You just need to wind the triangles in the opposite order. Unity will take care of the normals automatically for you, using that script, if you do that.
Thanks for the explanation; reversing the faces makes sense.
I'm still having issues with reversing them.
Here is the original code that creates them (this is the code I will need to reverse).
for (float y = 0.0f; y < vCount2; y++)
{
for (float x = 0.0f; x < hCount2; x++)
{
if (orientation == Orientation.Horizontal)
{
vertices[index] = new Vector3(x * scaleX, 0.0f, y * scaleY);
}
else
{
vertices[index] = new Vector3(x * scaleX, y * scaleY, 0.0f);
}
uvs[index++] = new Vector2(x * uvFactorX, y * uvFactorY);
}
}
I've tried to reverse them with no luck. I tried to reverse the index so it decrements which did not work. Then I tried reversing the for loops so they decrement. I'm not sure why it did not work. Here is the for loop reversal code I tried.
for (float y = vCount2; y > 0.0f; y--)
{
for (float x = hCount2; x > 0.0f; x--)
{
if (orientation == Orientation.Horizontal)
{
vertices[index] = new Vector3(x * scaleX, 0.0f, y * scaleY);
}
else
{
vertices[index] = new Vector3(x * scaleX, y * scaleY, 0.0f);
}
uvs[index++] = new Vector2(x * uvFactorX, y * uvFactorY);
}
}