Tried out this fractal terrain stuff but it just looks the same i guess?
This commit is contained in:
@ -672,7 +672,7 @@ float TerrainNode::GetHeightAtPoint(float x, float z, bool waterCollide)
|
||||
int cellX = (int)((x - _terrainStartX) / _cellSizeX);
|
||||
int cellZ = (int)((_terrainStartZ - z) / _cellSizeZ);
|
||||
|
||||
int currentIndex = (cellZ * _gridCols * 4) + (cellX * 4);
|
||||
int currentIndex = ((cellZ * _gridCols) + cellX) * 4;
|
||||
|
||||
float dx = x - _terrainVerts[currentIndex].Position.x;
|
||||
float dz = z - _terrainVerts[currentIndex].Position.z;
|
||||
|
Reference in New Issue
Block a user