Offset support for blend.
This commit is contained in:
@@ -104,7 +104,7 @@ public class Terrain {
|
||||
|
||||
// Transform world loc into zone space coordinate system
|
||||
|
||||
Vector2f terrainLoc = ZoneManager.worldToZoneSpace(worldLoc, terrainZone);
|
||||
Vector2f terrainLoc = ZoneManager.worldToTerrainSpace(worldLoc, terrainZone);
|
||||
|
||||
// Interpolate height for this position in terrain
|
||||
|
||||
@@ -178,12 +178,12 @@ public class Terrain {
|
||||
}
|
||||
}
|
||||
|
||||
public float terrainBlend(Vector2f terrainLoc) {
|
||||
public float terrainBlend(Vector2f zoneOffset) {
|
||||
|
||||
// Normalize terrain loc
|
||||
|
||||
Vector2f normalizedLoc = new Vector2f(terrainLoc.x / this.terrain_size.x,
|
||||
terrainLoc.y / terrain_size.y);
|
||||
Vector2f normalizedLoc = new Vector2f(zoneOffset.x / this.terrain_size.x,
|
||||
zoneOffset.y / terrain_size.y);
|
||||
|
||||
float minp = this.zone.min_blend / this.zone.major_radius;
|
||||
float maxp = this.zone.max_blend / this.zone.major_radius;
|
||||
|
||||
Reference in New Issue
Block a user