I think this is becuase c_trace traces from the model's origin, and not it's "feet". Try this for your trace (untested):

Code:
distance_to_ground = c_trace(vector(my.x,my.y,my.z+my.min_z), vector(my.x,my.y,my.z-500), IGNORE_ME | IGNORE_PASSENTS | IGNORE_PASSABLE | IGNORE_SPRITES | USE_BOX);




A8 com / A7 free