From e359b1dfdf70c45d0fbc52d75c29e4819429bc50 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 18 Sep 2023 02:11:38 -0400 Subject: [PATCH] Interpolating world altitude --- src/engine/InterestManagement/HeightMap.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/engine/InterestManagement/HeightMap.java b/src/engine/InterestManagement/HeightMap.java index 6527deb4..09d7b83c 100644 --- a/src/engine/InterestManagement/HeightMap.java +++ b/src/engine/InterestManagement/HeightMap.java @@ -262,11 +262,9 @@ public class HeightMap { percentage = currentDelta / blendDelta; else percentage = 0.0f; - - interpolatedTerrainHeight = FastMath.LERP(percentage, interpolatedTerrainHeight, interpolatedParentTerrainHeight); - + float interpolatedWorldAltitude = FastMath.LERP(percentage, heightMapZone.worldAltitude, parentZone.worldAltitude); interpolatedTerrainHeight = FastMath.LERP(percentage, interpolatedTerrainHeight, interpolatedParentTerrainHeight); - return interpolatedTerrainHeight + heightMapZone.worldAltitude; + return interpolatedTerrainHeight + interpolatedWorldAltitude; }