Well, I wanted to start programming a little game, in which you can move around with the mouse. The mouse_force.y is responsible for the speed and mouse_force.x for the direction, but in fact it doesn't work! Here's my code:



VECTOR boden;
var speed_down = 0;
var dist_down = 0;
var dist_ahead = 0;

action Spieler()
{
player = my;


c_setminmax(my);
wait(1);

camera_pos();

set(my,POLYGON);



vec_for_min(boden,me);



my.pan += 5 * mouse_force.x * time_step;


if (c_trace(my.x,vector(my.x,my.y,my.z-5000),IGNORE_ME |IGNORE_PASSABLE | USE_BOX) > 0)
{

dist_down = my.z + boden.z - target.z;
}

else
{
dist_down = 0;

}

if(dist_down>0)
{
dist_down = clamp(dist_down,0,accelerate(speed_down,5,0.1));
}
else
{
speed_down = 0;
}

var dist_ahead = 5* mouse_force.y* time_step;
c_move(me,vector(dist_ahead,0,0),vector(0,0,-dist_down),IGNORE_PASSABLE| GLIDE);

}