Blend function installed

This commit is contained in:
2023-10-09 07:47:50 -04:00
parent c90a250ba7
commit 53f7165e24
2 changed files with 4 additions and 12 deletions
+3 -5
View File
@@ -103,8 +103,8 @@ public class Terrain {
// Interpolate height for this position in terrain
float interpolatedTerrainHeight = terrainZone.terrain.getInterpolatedTerrainHeight(terrainLoc);
interpolatedTerrainHeight += terrainZone.worldAltitude;
float interpolatedChildHeight = terrainZone.terrain.getInterpolatedTerrainHeight(terrainLoc);
interpolatedChildHeight += terrainZone.worldAltitude;
// Interpolate height for this position in parent
@@ -113,9 +113,7 @@ public class Terrain {
// Blend between heights
interpolatedTerrainHeight = interpolatedTerrainHeight + interpolatedParentTerrainHeight * (1 - terrainZone.terrain.heightBlend(terrainLoc));
return interpolatedTerrainHeight;
return interpolatedChildHeight + interpolatedParentTerrainHeight * (1 - parentZone.terrain.heightBlend(parentLoc));
}