mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 14:44:17 +00:00
fix indices - infinite water works
This commit is contained in:
parent
04be0ad46c
commit
7b491d49ae
1 changed files with 3 additions and 6 deletions
|
@ -127,20 +127,17 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
normals[vertexIndex - 2] = Vector3.up;
|
||||
normals[vertexIndex - 1] = Vector3.up;
|
||||
|
||||
// triangle 1: low left, low right, up right
|
||||
// triangle 2: low left, up right, up left
|
||||
|
||||
int lowLeft = vertexIndex - 4;
|
||||
int lowRight = vertexIndex - 3;
|
||||
int upLeft = vertexIndex - 2;
|
||||
int upRight = vertexIndex - 1;
|
||||
|
||||
indexes[indexesIndex++] = lowLeft;
|
||||
indexes[indexesIndex++] = upRight;
|
||||
indexes[indexesIndex++] = lowRight;
|
||||
indexes[indexesIndex++] = lowLeft;
|
||||
indexes[indexesIndex++] = upLeft;
|
||||
indexes[indexesIndex++] = upRight;
|
||||
indexes[indexesIndex++] = lowLeft;
|
||||
indexes[indexesIndex++] = upRight;
|
||||
indexes[indexesIndex++] = upLeft;
|
||||
}
|
||||
|
||||
int GetNumVertexesForQuad() => 4;
|
||||
|
|
Loading…
Reference in a new issue