Hi everyone. My arm needs to attach to a ball (Yellow cirkel) that's turning around the body. That's working, but the end of the arm (red cirkel) turns with the Ball.

I want that the end of the arm (red cirkel) stays there, and when the ball is at the otherside of the arm, it will lift up the arm.

Just like this movie: http://www.youtube.com/watch?v=zPGaXLDNXF8
Look at 2:05, the arms goes up and down. That's what i want.

My code now:

Code:
action bal_1()
{
	bal = my;
	
	while(me){
	vec_for_vertex(my.x, molen, 946);
		
	if (key_t) { my.skill1 = 1; }
	ent_bonerotate(my,"bal",vector(my.skill1,0,0));
	
	my.scale_x = 10.000;
	my.scale_y = 10.000;
	my.scale_z = 10.000;
	my.pan = molen.pan;
	wait(1);
	}
}

action arm_1()
{
	arm1 = my;
	ent_create("bal.mdl",temp,bal_1);
	while(1){
	vec_for_vertex(my.x, molen, 953);
	vec_for_vertex(my.x, bal, 13);	
	
	my.scale_x = 0.100;
	my.scale_y = 0.100;
	my.scale_z = 0.100;
	my.pan = 50 + molen.pan;
	my.z = -467.142;
	

	wait(1);
}
}

action molen_1()
{
	molen = my;
	
	// Objecten aanmaken, en op goede plek attachen
	
	ent_create("anim.mdl",temp,arm_1);
	ent_create("anim.mdl",temp,arm_2);
	
	while(me){
		my.pan += 0.20;
		wait(1);
	}
	
}





SOLVED BY MYSELF.

Last edited by Warkey; 05/10/09 16:02.