What's the functional difference between terrain following and altitude?

I have a hexcopter that I’m trying to fly solely with an onboard computer. The onboard computer sends commands to a pixhawk. I want the X, Y, and yaw to be relative to the drone, but the Z to be a constant distance from the ground. What would be the difference between setting EK2_ALT_SOURCE to use my rangefinder vs using it for terrain following?

The difference is that by setting EK2_ALT_SOURCE to rangefinder, the EKF will use the rangefinder to estimate altitude, not just height above terrain. This can be dangerous when flying outdoors, since bad or missing rangefinder readings can easily cause a flyaway because the altitude estimate will diverge. That setting is really just for special cases where the rangefinder is more reliable than the baro for altitude estimation, such as indoor flying. If you want the rangefinder to define the altitude, a more robust configuration is to setEK2_RNG_USE_HGT and RNGFND_MAX_CM to appropriate values.

But for terrain following outdoors, you don’t need to change USE_HGT or ALT_SOURCE, since you will still want the baro to be used for estimating altitude, while the rangefinder will still be used to follow terrain as long as your waypoint altitudes are set to be alt above terrain.