Use half extents as offset from center
This commit is contained in:
1 parent
c6e0e36531
commit
279a0aed91
2 files changed
+4
-4
No files matched your search
@@ -40,8 +40,8 @@ public class GetHeightCmd extends AbstractDevCmd {
|
||||
|
||||
Vector2f zoneLoc = ZoneManager.worldToTerrainSpace(playerCharacter.getLoc(), heightmapZone);
|
||||
Vector2f zoneOffset = ZoneManager.worldToZoneOffset(playerCharacter.getLoc(), heightmapZone);
|
||||
Vector2f normalizedOffset = new Vector2f(Math.abs(zoneOffset.x) / heightmapZone.terrain.terrain_size.x,
|
||||
Math.abs(zoneOffset.y) / heightmapZone.terrain.terrain_size.y);
|
||||
Vector2f normalizedOffset = new Vector2f(Math.abs(zoneOffset.x) / heightmapZone.major_radius,
|
||||
Math.abs(zoneOffset.y) / heightmapZone.minor_radius);
|
||||
|
||||
Vector2f gridSquare = heightmapZone.terrain.getTerrainCell(zoneLoc);
|
||||
gridSquare.x = (float) Math.floor(gridSquare.x);
|
||||
|
||||
Reference in new issue
Block a user