forked from Mirrorlandia_minetest/minetest
Use correct indexes when checking mesh normals
This commit is contained in:
parent
a684a91bf5
commit
e4583cb9b7
@ -356,7 +356,7 @@ bool checkMeshNormals(scene::IMesh *mesh)
|
|||||||
buffer->getPosition(buffer->getIndices()[i+2]));
|
buffer->getPosition(buffer->getIndices()[i+2]));
|
||||||
|
|
||||||
for (u16 j = 0; j < 3; j++)
|
for (u16 j = 0; j < 3; j++)
|
||||||
if (plane.Normal.dotProduct(buffer->getNormal(buffer->getIndices()[j])) < 0)
|
if (plane.Normal.dotProduct(buffer->getNormal(buffer->getIndices()[i+j])) <= 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user