It's still moving upwards. Here are the codes:

player:

Code:
action player_action()
{ 
	
		while(1){
			player = me;
			if(key_1 || key_x || (key_x && vec_dist(my.x, player.x) <= 20)){
				wait(1);
		 rot_player(); //change player
		 	
		}
		handle_movement();
		handle_gravity();
		handle_animation(1);
		wait(1);
	  }
	
}



ball action:

Code:
action theBall()
{
	while(!player) wait(1);
	
   //set(my, SHADOW);
   set(me,POLYGON);
   c_setminmax(me);
   	
	phent_settype(my, PH_RIGID, PH_SPHERE);
	phent_setmass(my, 1, PH_SPHERE);
	phent_setfriction(my,90);
	phent_setelasticity(my,75,100);
	phent_setdamping(my,30,5);
	phent_addvelcentral(my,vector(10,10,0));
	ph_setgravity(vector(0,0,-500));
   

	my.emask |= ENABLE_FRICTION;
	
	
	while(1){	
	
     if((key_w || key_a || key_s || key_d) && vec_dist(my.x, player.x) <= 20){

        move_with_ball();
     }	 
      wait(1);
   }
}



the ball movement:

Code:
function move_with_ball()
{

while(my == NULL) wait(1);


while(1){
		proc_mode = PROC_LATE;

		phent_settype(my, 0, 0);

      vec_set(my.x,vector(player.x + 13 * cos(player.pan),player.y + 13 * sin(player.pan), player.z - 12));
      
      
     
      phent_settype(my, PH_RIGID, PH_SPHERE);
      
      if(key_x){
      	pass();
      	break;
      }
      
      if(key_space){
      	shot();
      	break;
      }
      
      if(key_1){
      break;	
      }	
       
      
wait(1);
}
}



Thanks.


I know I can.