vec_set(temp.x, my.x);
temp.z -= 10000;
floor = c_trace(my.x, temp.x, IGNORE_ME | IGNORE_PASSABLE | USE_BOX | GLIDE); // compute the distance between player's origin and the floor below its feet


if(key_space && floor < 30 && jump == 0 && J == 0)
{
jump = 1;
}
if(jump == 1)
{

c_move(me,vector(0, 0, 20*time_step), nullvector, GLIDE);
J = 1;
}
if(floor > 30)
{
jump = 2;
}
if(floor < 30 && !key_space)
{
jump = 0;
J = 0;
}

i've wrote this code for jumping but i found a problem: when i jump on a plataform and the player is in th air, there seem to be a tracing problem because when there's an obstacle beneath the player the tracing sets to 0 and it keep increasing altitude.