hi .
i have ball in my environment and move that by change gravity factor and use "friction " , "mass " but dont turn (glid in the environment ). where is my code have problem .can you tell me .thanks wink

Code:
// ball.wdl 2008-12-09
function main {
	level_load("ball.wmb");
	wait(3);
}
var earthgravity[3]=0,0,-386;

entity* ball_ent;
action ball_act{
	my.polygon=on;
	
	var earthgravity[3] = 0,0, -386;
	ball_ent=me;
	while(me==null){wait(1);}
	var start_pos_tmo;
	phent_settype ( me, PH_RIGID, 0 );

	phent_settype ( me, 0, 0 );
	ph_setgravity( earthgravity );
	phent_settype ( me, PH_RIGID, PH_box );	
	move_car_func();
}

function move_car_func{
	var tmp;
	while(1){
		wait(time);
		if(key_cul){earthgravity.x-=10;wait(5);}
		if(key_cur){earthgravity.x+=10;wait(5);}
		phent_setmass(me, 25, PH_SPHERE);
		ph_setgravity( earthgravity );
		phent_setfriction(my, 10);

		if(key_0){phent_enable( me, 0 );}
		if(key_1){phent_enable( me, 1 );}
		
	}
}


Last edited by fat32; 12/12/08 08:07.

dobidob hosein_dig and max_man7000 game

HAPPY NEW YEAR !!