@Superku your gravity is pretty good and works perfectly in your sample project ,but it doesn't fit the rest of my player's action as I use some dumb way for animating, moving...etc. and I got some problems with animation ,not because of your code ,but because of my player's code and the player's feet kept sinking into the ground
So what did I do? I modified your code and made it more simple (at least for me) ,but I've got less problems

as I no longer have an animation problem (actually the animation works perfectly) ,but I still have the sinking-feet problem

Here's my code inspired from yours:
gravity_speed.x = 0;
gravity_speed.y = 0;
vec_for_min(feet_height.x,my);
feet_height.z *= my.scale_z;
vec_set(temp.x,my.x);
temp.z -= 5000;
c_ignore(8,0);
distance_to_ground = c_trace(my.x,temp.x,IGNORE_ME | USE_BOX | IGNORE_PASSABLE) - abs(feet_height.z);
DEBUG_VAR(distance_to_ground,100); //It is clear that it is negative!
if(distance_to_ground > 0)
{
gravity_speed.z -= 9*time_step;
if(gravity_speed.z < -90) gravity_speed.z = -90;
}
else
{
jumping = 0; //"jumping" is for animation
gravity_speed.z = 0;
if(key_space)
{
if(key_space_off)
{
key_space_off = 0;
gravity_speed.z = 65*time_step;
jumping = 1;
}
}
else
{
key_space_off = 1;
}
}
c_move(my,nullvector,gravity_speed.x,GLIDE | IGNORE_PASSABLE);
Bugs:-
* There's only one bug. The feet of the player (from the "templates" folder) sometimes sink into the ground and sometimes not. Also, I think the reason for this is that "distance_to_ground" is negative after putting a "DEBUG_VAR" instruction
Thank you for always introducing help when needed
Best wishes