Hello people,

Some weird thing seems to happen ><

I have 2 entities, --> 1 x Arm, 1 x Cross.
The 'Cross' is attached to 'Arm'.
Entity 'Arm' is lifting UP and DOWN.
When I disable Physics on the 'Arm' entity, the 'Cross' entity which is attached to 'Arm' does go up and down together with the 'Arm' entity (Lifting)

As soon as I add physics on the 'Arm' entity, the 'Cross' entity doesn't want to come up.

The 'Arm' entity DOES rotate around it's pan, and the 'Cross' entity DOES follow the given vertex, but won't lift then...

Code:
       var axiskruis[3] = 0,0,1;


kruis_1 = Cross entity
Code:
action kruis_1
{
	var hingeIDkruis;
	var anchorkruis[3];
        kruis1 = my;
        my.passable = on;	
   
        my.scale_x = 0.50;
        my.scale_y = 0.50;
        my.scale_z = 0.50;
   
	phent_settype(my,PH_RIGID,PH_SPHERE);
	phent_setmass(my, 1, PH_SPHERE);
	phent_setGroup(my,2);
	hingeIDkruis = phcon_add(PH_HINGE, my, arm1);
	vec_rotate(kruis_pos1, vector(0,0,1));
	phcon_setparams1(hingeIDkruis, my.pos, axiskruis, nullvector );
	phcon_setparams2(hingeIDkruis, vector(-360, 360, 0), nullvector, nullvector);
	
	wait(1);
	phent_setdamping(my,100,100);
	
	while(1) 
	{
		vec_for_vertex(my.x, arm1, 9107);
		phcon_setmotor(hingeIDkruis,vector(kruisspeed,2400000,0),nullvector,nullvector);  //Gondelkreuze beschleunigen
		wait(1);
	}
}


arm_1 = Arm entity
Code:
action arm_1
{
	var oid;
	var armpos[3];
        proc_late(); //Wait...
	arm1 = my;
	my.passable = on;	
        my.flare = off;
        my.transparent = off;
        my.ambient = 10;
        my.roll = 0;
   
        my.scale_x = 1.4;
        my.scale_y = 1.4;
        my.scale_z = 1.4;
		
	phent_settype(my, PH_RIGID, PH_BOX);
	phent_setmass(my, 1, PH_BOX);
	phent_setgroup(my, 2);
	
	vec_set(armpos, vector(0,0,0));

	oid = phcon_add(PH_HINGE, my, molen);
	phcon_setparams1(oid, my.pos, armpos, nullvector);
	phcon_setparams2(oid, vector(0,0,0), nullvector, nullvector);
	
	vec_for_vertex(temp, my, 9107);
	ent_create("kruis.mdl", my.x, kruis_1);

        while(1)
        {
               vec_for_vertex(my.x,molen,297);
	       phcon_setmotor(oid,vector(0,0,0),nullvector,nullvector);
               wait(1);
        }
}


THANKS ALOT!

Last edited by Dreher; 05/10/09 01:56.

A7 7.77