- Home /
camera matrix flip inverts mesh normals! How can i prevent this?
By flipping the camera matrix int the x-axis the mesh normals of all object will be inverted!
how can i tell the matrix to avoid inverting the mesh normals? i use the following code:
Matrix4x4 mat = Camera.main.projectionMatrix;
mat *= Matrix4x4.Scale(new Vector3(-1, 1, 1));
Camera.main.projectionMatrix = mat;
Comment
Answer by Matt-Downey · Dec 17, 2011 at 10:23 AM
Sort of late for an answer, but GL.SetRevertBackfacing(true) will fix your problem.
You won't get to keep non-ambient lighting though (realtime lighting doesn't work without making your own shader).
Your answer
Follow this Question
Related Questions
Rotate non square Color array by 90 degrees 1 Answer
card rotation ::click & jump+rotate 3 Answers
car movement basics 5 Answers
Why does half my model flip when I animate it? 2 Answers
simple gui question 2 Answers