First, make downwards trace with USE_BOX set on. Second, use "vec_for_min" to get the lower vertex of the players model, and use the vector which is returned by it, to get distance to ground:
Code:
my.height = my.z + min_vec.z - target.z;

After all done, you can pull player down and make smooth movement, something like this:
Code:
absdist.z = -(my.height - 17); // 17 is dist to ground
absdist.z = maxv( -35 * time_step, absdist.z); // 35 is falling speed

I hope, this was usefull for you.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung