hmm.. k.. There´s just another problem with the movement...

The ball rotates to the plates tilt/roll...
But, the distance to the plates is getting smaller.. and via my.z, i can´t change it...

Here´s a video again:


and the code:
Code:
action plate()
{
	set(my,FAT);
	wait(1);
	c_setminmax(my);
	vec_set(my.min_x, vector(my.min_x+1, my.min_y+1, my.min_z+1));
	vec_set(my.max_x, vector(my.max_x+1, my.max_y+1, my.max_z+1));
	set(my,BRIGHT);
	set(my,POLYGON);
}

action player_action()
{
	player = my;
	set(my,POLYGON);
	vec_set(my.scale_x,vector(0.5,0.5,0.5));
	wait(1);
	c_setminmax(my);
	while(1)
	{
		VECTOR tmpV;
		vec_set(tmpV, vector(my.x,my.y,my.z-9999));
		vec_rotateaxis(tmpV, my.x, my.pan);
		vec_sub(tmpV,my.x);
		c_trace(my.x, tmpV, IGNORE_ME | USE_BOX);
		if(you != NULL)
		{
			my.tilt   = you.roll;
			my.skill1 = vec_dist(my.x, target.x);
			if(my.skill1 < 20 && my.skill1 < 15)
			{
				c_move(my,vector(0,0,10*time_step),nullvector,GLIDE);
			}
			if(my.skill1 > 20)
			{
				c_move(my,vector(0,0,-10*time_step),nullvector,GLIDE);
			}
		}
		
		if(key_a == 1){c_move(my,vector(30*time_step,0,0),nullvector,GLIDE);}
		
		vec_set(camera.x, vector(my.x,my.y-400,my.z));
		wait(1);
	}
}


Last edited by Espér; 04/08/09 22:51.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<