Can anyone think of a better method of detecting if an entity is on the "ground" or another object?


vec_set(temp, my_entity.x);
temp.z -= 500;
if(c_trace (my_entity.x,temp,IGNORE_ME|IGNORE_PASSABLE|IGNORE_MODELS|IGNORE_SPRITES) < 25)
{
// Do stuff
}


The problem with this is there seems to be a very inconsistant value returned from c_trace and even an object at total rest is not returning zero.