Browse Source

Interpolation cleanup

combat-2
MagicBot 1 year ago
parent
commit
e80dd66809
  1. 6
      src/engine/InterestManagement/Terrain.java

6
src/engine/InterestManagement/Terrain.java

@ -152,10 +152,10 @@ public class Terrain {
// Interpolate between the 4 vertices // Interpolate between the 4 vertices
interpolatedHeight = topRightHeight * (1 - offsetY) * (offsetX); interpolatedHeight = topLeftHeight * (1 - offsetX) * (1 - offsetY);
interpolatedHeight += (bottomRightHeight * offsetY * offsetX); interpolatedHeight += topRightHeight * (1 - offsetY) * (offsetX);
interpolatedHeight += (bottomLeftHeight * (1 - offsetX) * offsetY); interpolatedHeight += (bottomLeftHeight * (1 - offsetX) * offsetY);
interpolatedHeight += (topLeftHeight * (1 - offsetX) * (1 - offsetY)); interpolatedHeight += (bottomRightHeight * offsetY * offsetX);
interpolatedHeight *= this.terrain_scale; // Scale height interpolatedHeight *= this.terrain_scale; // Scale height

Loading…
Cancel
Save