I am moving a ball around a level using this code:

code:
  
if(key_cuu)
{
vec_set(temp.x,camera.x);
temp.z = ball.z;
vec_diff(force.x,ball.x,temp.x);
vec_normalize(force,power); // power is the force, force is the direction actually
phent_addcentralforce(ball,force);
//vec_set(player_force.x,force.x);
}
if (key_cud)
{
vec_set(temp.x,camera.x);
temp.z = ball.z;
vec_diff(force.x,ball.x,temp.x);
vec_inverse(force);
vec_normalize(force,power);
phent_addcentralforce(ball,force);
//vec_set(player_force.x,force.x);
}
if(key_cul)
{
vec_set(temp.x,camera.x);
temp.z = ball.z;
vec_diff(force.x,ball.x,temp.x);
force_ang.pan = 90;
vec_rotate(force,force_ang);
vec_normalize(force,power);
phent_addcentralforce(ball,force);
}
if(key_cur)
{
vec_set(temp.x,camera.x);
temp.z = ball.z;
vec_diff(force.x,ball.x,temp.x);
force_ang.pan = -90;
vec_rotate(force,force_ang);
vec_normalize(force,power);
phent_addcentralforce(ball,force);
}

This works fine... I jump.. using the following code:

code:
 

var temp_jump = 0;
while(temp_jump<3)
{
exclusive_global;
force.x = 0;
force.y = 0;
force.z = jump_power;
phent_addcentralforce(ball,force);
temp_jump+=1;
}

The problem that I'm having is when I land from a jump, the ball is erratic. It doesn't seem to matter how I was moving or the previous spin on the ball... when it lands it is erratic. It doesn't necessarily continue the same direction that it was going or the same spin... When I land from jumping I seem to go in a random direction.. somtimes off to the right , sometimes off to the left... I would like to continue in the same direction as it seems I should.

Any suggestions that would help to eliminate the random spinning after landing a jump are most appreciated. Thanks.

Jason