Terrain Height Issue...

The terrain property you are using looks to be the overall height of the terrain (i.e. from the lowest point in the ocean to the highest poing on land).

I know this because when I stand at the highest point on my current map it is 172m above sea level vs. what your mod is calculating/displaying at startup...

06/05/2026 00:07:09 AM | [FancyDrop] Map Highest Point: (500m) | Plane flying height: (~125m)​

Here is my current setting...

"Multiplier for (plane height * highest point on Map); Default 1.0": 0.25,

Here is your calculation...

Puts($"Map Highest Point: ({TerrainMeta.HighestPoint.y}m) | Plane flying height: (~{TerrainMeta.HighestPoint.y * configData.AirdropSettings.planeOffSetYMultiply}m)");

 

As a Unity developer I know you initially set the terrain & ocean objects at Vector3.zero and then adjust your terrain object up/down to get the max height where you want it.  So you also need to subtract that Y offset in your calculation to get the Max Terrain Height and then multiply it by your setting -or- simply add a number to it.

( TerrainMeta.HighestPoint.y - Offset ) * configData.AirdropSettings.planeOffSetYMultiply
-OR-
( TerrainMeta.HighestPoint.y - Offset ) + configData.AirdropSettings.planeOffSetY

 

I'll look deeper into this and try to get the correct terrain properties and formula ASAP. 

In the meantime, it might be better to simply allow admins to set the spawn height (above sea level).

The function below gives you the EXACT Maximum Terrain Height of the current map.  Call this function when your mod is initialized (i.e., whenever the server starts).  You can then use the MaxTerrainHeight value to apply your settings to make the final aircraft spawn height adjustments.

        private float MaxTerrainHeight;        
        private void GetMaxTerrainHeight()
        {
            // Get the active terrain's data
            TerrainData terrainData = Terrain.activeTerrain.terrainData;
            int width = terrainData.heightmapResolution;
            int height = width;
            // Push terrain heights data into a 2D array
            float[,] heights = terrainData.GetHeights(0, 0, width, height);
            // Loop through the heights data 
            for (int y = 0; y < height; y++)
            {
                for (int x = 0; x < width; x++)
                {
                    // Get current terrain height data values (normalized between 0.0 and 1.0)
                    float currentHeight = heights[y, x];
                    // Is the current data larger thatn the previously read data?
                    if (currentHeight > MaxTerrainHeight)
                    {
                        // Update the Max Height value
                        MaxTerrainHeight = currentHeight;
                    }
                }
            }
            // Calculate real world Maxiumu Terrain Height
            MaxTerrainHeight = (MaxTerrainHeight * terrainData.size.y) - TerrainMeta.HighestPoint.y;
        }