Quote:
When I move to a wall the c_trace think that the top of the wall is the floor and lift me up...
not exacly because you trace -800 so you trace down not ahead
this will keep your entity always on the ground
Code:
function gravity
{
vec_set(temp, my.x); temp.z -= 5000;
trace_mode = IGNORE_ME + ignore_models + IGNORE_PASSABLE + IGNORE_SPRITES + use_box + scan_texture;
result = trace (my.x, temp);
my.z -= result;
}
you may of course cut ignore_models if you want