Browse Source

Fix GenMeshPlane when resX != resZ (#3425)

Co-authored-by: Stanislav Yablonskiy <s.yablonskiy@pixonic.com>
pull/3429/head
neyrox 1 year ago
committed by GitHub
parent
commit
c4296b166a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/rmodels.c

+ 1
- 1
src/rmodels.c View File

@ -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;

Loading…
Cancel
Save