Skip to content

Commit

Permalink
Fix GenMeshPlane when resX != resZ (#3425)
Browse files Browse the repository at this point in the history
Co-authored-by: Stanislav Yablonskiy <[email protected]>
  • Loading branch information
neyrox and s-yablonskiy authored Oct 16, 2023
1 parent 73363f8 commit c4296b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rmodels.c
Original file line number Diff line number Diff line change
Expand Up @@ -2249,7 +2249,7 @@ Mesh GenMeshPlane(float width, float length, int resX, int resZ)
for (int face = 0; face < numFaces; face++)
{
// Retrieve lower left corner from face ind
int i = face % (resX - 1) + (face/(resZ - 1)*resX);
int i = face + face / (resX - 1);

triangles[t++] = i + resX;
triangles[t++] = i + 1;
Expand Down

0 comments on commit c4296b1

Please sign in to comment.