Here's mine:

Code:

function init_spinner
{

var constraint2;

phent_settype(my, ph_rigid, ph_poly); //-polygonal collision
constraint2=phcon_add(ph_hinge, my, 0);

phent_setmass(my, 0.5, ph_poly); //lighter than a ball
phent_setfriction(my, 20); //not much friction
phent_setmaxspeed(my,1000,null);
phent_setdamping(my, 0, 20);


phcon_setparams1(constraint2, my.x,vector(0,1,0),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);
}

}



If you can make one that doesn't leave it's constraints and fly all over the screen, please tell me how you manage it.

Last edited by A.Russell; 08/11/04 22:36.