I'm using this code for gravity/floor placement of my first person movement code. I keep getting stuck in the ceiling when the floor and ceiling slope together and meet like this shape: <

Code:
dist_down = c_trace(my.x,vector(my.x,my.y,my.z-5000),IGNORE_ME | IGNORE_PASSABLE | USE_BOX );
      //vec_set(normalplane,hit.nx);
      z_spot = hit.z;
      if(my.z > z_spot + 16)
      {
      	zforce -= time_step * accel;
      	accel += time_step *0.25;
      }
      else
      {
      	zforce = 0;
      	accel = 0;
      }



Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en