Pulley Problem

fizzle

24-07-2006 20:22:18

I am trying to make a pulley system that can be used to work as a scale, i not sure how any of the joints other than the upvector and ball and socket. I was wondering if there were any examples with the hinge or universal...here is my code for the pulley system. It appears but as soon as another body makes contact it disappears...

GameEnt *ge3 = new GameEnt(mSceneMgr,NULL,"GE3","barrel.mesh");
ge3->initBody(mWorld,Vector3(1,1,1),5,CYLINDER,"default",Vector3(2.6,8,0));
ge3->getBody()->setPositionOrientation(Vector3(10,30,0),Ogre::Quaternion::IDENTITY);

GameEnt *ge4 = new GameEnt(mSceneMgr,NULL,"GE4","barrel.mesh");
ge4->initBody(mWorld,Vector3(1,1,1),5,CYLINDER,"default",Vector3(2.6,8,0));
ge4->getBody()->setPositionOrientation(Vector3(20,50,0),Ogre::Quaternion::IDENTITY);

OgreNewt::Joint *joint3 = new OgreNewt::PrebuiltCustomJoints::CustomPulleyJoint(1,ge3->getBody(),ge4->getBody(),Vector3(0,1,0),Vector3(0,1,0));