Update loc of Vertex.
This commit is contained in:
parent
bb723036c0
commit
4ea0101cf6
4 changed files with 55 additions and 27 deletions
|
|
@ -78,10 +78,9 @@ namespace LandblockExtraction.LandBlockExtractor {
|
|||
private Vector3 GenerateVertexPosition(int landx, int landy, int x, int y, byte height) {
|
||||
int tmpx = (landx * BlockSize + y) * cellSize;
|
||||
int tmpy = (BlockSize * NumberLandBlocks * cellSize) - ((landy * BlockSize + x) * cellSize) - 1;
|
||||
var newX = (tmpx - (NumberLandBlocks * BlockSize * cellSize / 2));
|
||||
var newY = (tmpy - ((NumberLandBlocks * BlockSize * cellSize) - (NumberLandBlocks * BlockSize * cellSize / 2) - 1));
|
||||
|
||||
return new Vector3(newX, portalEngine.landScapeDefs.landHeightTable[height], newY);
|
||||
var newX = (tmpx - (NumberLandBlocks * BlockSize * cellSize / 2)) - landx * cellSize;// (tmpx - (NumberLandBlocks * BlockSize * cellSize / 2));
|
||||
var newY = (tmpy - ((NumberLandBlocks * BlockSize * cellSize) - (NumberLandBlocks * BlockSize * cellSize / 2) - 1)) + landy * cellSize; //(tmpy - ((NumberLandBlocks * BlockSize * cellSize) - (NumberLandBlocks * BlockSize * cellSize / 2) - 1));
|
||||
return new Vector3(newX + 1020, portalEngine.landScapeDefs.landHeightTable[height], newY - 1020);
|
||||
}
|
||||
private Vector4 GenerateVertexColor(uint cellInfo) {
|
||||
var terrain = MathOperations.GetTerrainInCellInfo(cellInfo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue