Browse Source

Blend test

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
761ec6f4af
  1. 7
      src/engine/InterestManagement/Terrain.java

7
src/engine/InterestManagement/Terrain.java

@ -123,7 +123,12 @@ public class Terrain { @@ -123,7 +123,12 @@ public class Terrain {
// Blend between terrains
return interpolatedChildHeight * (1 - terrainZone.terrain.terrainBlend(terrainOffset));
float blendFactor = terrainZone.terrain.terrainBlend(terrainOffset);
float terrainHeight = interpolatedChildHeight * blendFactor;
terrainHeight += interpolatedParentTerrainHeight * (1 - blendFactor);
return terrainHeight;
}

Loading…
Cancel
Save