pjhent_setmaxspeed didn't do anything. It still rotates around. When a ball hits the ball luncher, it gets bumped around to the wrong angle, and then goes all to hell bouncing and twirling all over the place.

To tell the truth, I don't understand about things like velocities and torque, so I probably have a few other settings off:

Code:
function init_ball_launcher()

{

var constraint1[3];

phent_settype(my, ph_rigid, ph_box);
constraint1=phcon_add(ph_slider, my, 0);
phent_setmaxspeed(my,10000,null); //this doesn't stop rotation (I tried with other values too)

phcon_setparams1(constraint1, vector(1,0,0),nullvector,nullvector); //limit movement to the x axis
phcon_setparams2(constraint1, vector(-50,0,0),nullvector,nullvector); //can't (shouldn't be able) to move more than 50 quants

while(my!=null)
{

temp.x=-spring;//The amount of force to move the ball launcher
temp.y=-1600000;//maximum force for the ball launcher
temp.z=0
//punch ball out chute
//should make it so that it moves back and forth in 1 second intervals
//seems to work okay until the ball launcher hits a ball and rotates around
phcon_setmotor(constraint1, temp, nullvector, nullvector);
sleep(0.5);
temp.y-=temp.x;
phcon_setmotor(constraint1, temp, nullvector, nullvector);
sleep(0.5);
}
}






Last edited by A.Russell; 06/07/04 19:26.