Browse Source

Interpolating world altitude

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
e359b1dfdf
  1. 6
      src/engine/InterestManagement/HeightMap.java

6
src/engine/InterestManagement/HeightMap.java

@ -262,11 +262,9 @@ public class HeightMap {
percentage = currentDelta / blendDelta; percentage = currentDelta / blendDelta;
else else
percentage = 0.0f; percentage = 0.0f;
float interpolatedWorldAltitude = FastMath.LERP(percentage, heightMapZone.worldAltitude, parentZone.worldAltitude);
interpolatedTerrainHeight = FastMath.LERP(percentage, interpolatedTerrainHeight, interpolatedParentTerrainHeight);
interpolatedTerrainHeight = FastMath.LERP(percentage, interpolatedTerrainHeight, interpolatedParentTerrainHeight); interpolatedTerrainHeight = FastMath.LERP(percentage, interpolatedTerrainHeight, interpolatedParentTerrainHeight);
return interpolatedTerrainHeight + heightMapZone.worldAltitude; return interpolatedTerrainHeight + interpolatedWorldAltitude;
} }

Loading…
Cancel
Save