btw, another issue about the bounding box: I am using the c_trace to simulate the gravity, but I don't know why the player walk with his feet a bit under the ground, and sometimes the player walks on different distance from the terrain surface. I tried to chnage the boundin box's z value, so that it begins a bit under the model, though it didn't help much, the player walks well on certain areas but under the ground with his feet on other areas. The question is: how to simulate the gravity, so that the player walks perfectly on the terrain surface. I just played the "Territory" demo, the player walks perfectly on the surface there, I wanted to write this question in that thread but it would be off-topic in the projects section. So, can anyone help?
Btw, here is the part of the code I use in the player's action, it also simulates the fall with acceleration.
var a = 1;
action player(){
while(1){
c_setminmax(me);
vec_set(my.min_x,vector(0,-1.2,-0.7));
vec_set(my.max_x,vector(2.7,1.2,13));
trace_to_ground = c_trace(my.x, vector(my.x,my.y,my.z-5000),IGNORE_ME|IGNORE_PASSENTS|IGNORE_PASSABLE|IGNORE_SPRITES|USE_BOX);
if(trace_to_ground > 1){
a +=0.2;
if(my.z > target.z){my.z -= a*time_step;
}
if(my.z < target.z){my.z = target.z;
}
wait(1);}