- Home /
The question is answered in the comments
Procedural Mesh Display Ignoring Normals?
I have a simple procedural mesh that I am generating. It is a 2d polygon where the 3rd point in all of triangles is the center of the polygon (think of a pizza).
I have a prefab with a mesh filter and renderer.
I instantiate from the prefab at runtime and assign my mesh to it.
The problem is, in my scene I always have to to rotate my object 180 degrees to make it visible (this essentially flips it over).
I thought to myself that all I would need to do is change the direction of my normals on the mesh and it should display.
Unfortunately that is not the case. I have verified my normals are in fact changing during my tests, however regardless of what I set them to (up, down, etc.) I always have to rotate my object to get it to display.
There must be something about normals, meshes and graphics I am not understanding.
Anyone have any ideas? I can provide additional information if that would help.
Thanks!
The normals of the vertices do not dictate the direction of the faces rastorized. The order of the vertices is what deter$$anonymous$$es the "direction" of the face they create.
Ah, so that explains it then. If I reverse the order of my vertices to be counter clockwise that should achieve what I want without having to rotate my object.
Thanks!
Follow this Question
Related Questions
Alternative to Mesh.RecalculateNormals 0 Answers
How to identify mesh faces 2 Answers