Browse Source

Update to blend logic.

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
913a2601d5
  1. 3
      src/engine/InterestManagement/HeightMap.java

3
src/engine/InterestManagement/HeightMap.java

@ -229,12 +229,11 @@ public class HeightMap {
// Interpolate height for this position using pixel array. // Interpolate height for this position using pixel array.
float interpolatedTerrainHeight = heightMapZone.getHeightMap().getInterpolatedTerrainHeight(zoneLoc); float interpolatedTerrainHeight = heightMapZone.getHeightMap().getInterpolatedTerrainHeight(zoneLoc);
worldHeight = interpolatedTerrainHeight + heightMapZone.worldAltitude;
// Heightmap blending is based on distance to edge of zone. // Heightmap blending is based on distance to edge of zone.
if (Bounds.collide(worldLoc, heightMapZone.maxBlend) == true) if (Bounds.collide(worldLoc, heightMapZone.maxBlend) == true)
return worldHeight; return interpolatedTerrainHeight + heightMapZone.worldAltitude;
// We will need the parent height if we got this far into the method // We will need the parent height if we got this far into the method

Loading…
Cancel
Save