I attempted to make the spinner from a hinge. It doesn't move at all. I assigned the spinner entities this action:

Code:
action init_spinner

{
var constraint2;

phent_settype(my, ph_rigid, ph_poly); //ph_poly -polygonal collision?
constraint2=phcon_add(ph_hinge, my, 0); //a hinge would be all that is needed in case, right?

phent_setmass(my, 0.5, ph_poly); //lighter than a ball
phent_setfriction(my, 10); //not much friction

phcon_setparams1(constraint2, my.x,vector(0,0,1),nullvector); //anchor point (origin is in centre of entity)
phcon_setparams2(constraint2, vector(360,-360,0),nullvector,nullvector); //can spin all the way around

while(my!=null) //didn't know if a loop was neccessary, so threw it in just in case
{
wait(1);
}

}



I've commented what I thought I was doing.

EDIT> Nevermind, fixed it. Amazing what a lunch break can do.



Last edited by A.Russell; 06/12/04 14:03.