public float GetHeightAtPosition(float X, float Z)
{
float steepness;
//if (Constants.NUM_OF_TERRAINS == 1)
return clamp(terrain.GetHeightAtPosition(X, Z, out steepness));
//if (X > -512 * Constants.TERRAIN_CELL_SIZE && X < 0 &&
// Z > -512 * Constants.TERRAIN_CELL_SIZE && Z < 0)
// return clamp(terrain[3].GetHeightAtPosition(X, Z, out steepness));
//else if (X > -512 * Constants.TERRAIN_CELL_SIZE && X < 0 &&
// Z > 0 && Z < 512 * Constants.TERRAIN_CELL_SIZE)
// return clamp(terrain[1].GetHeightAtPosition(X, Z, out steepness));
//else if (X >= 0 && X < 512 * Constants.TERRAIN_CELL_SIZE &&
// Z >= 0 && Z < 512 * Constants.TERRAIN_CELL_SIZE)
// return clamp(terrain[0].GetHeightAtPosition(X, Z, out steepness));
//else if (X >= 0 && X < 512 * Constants.TERRAIN_CELL_SIZE &&
// Z > -512 * Constants.TERRAIN_CELL_SIZE && Z < 0)
// return clamp(terrain[2].GetHeightAtPosition(X, Z, out steepness));
//else
// return 0;
//return clamp(terrain[0].GetHeightAtPosition(X, Z, out steepness)) ;
}