ogre_newbie
29-03-2009 09:40:25
Hi all,
I am trying to make two objects(ogrenewt body) joining together by hinge joint when they collide in a contact callback function, I just simply use the following line to make the joint:
joint = new OgreNewt::BasicJoints::Hinge( mWorld, m_body0 , m_body1, Ogre::Vector3(30,0,0), Ogre::Vector3(0,1,0) );
The second last parameter is how far is the joint from the body (30 is the radius of the ball) , and the last parameter is the direction of the pin right (look down in the y-axis)
Can anyone tell me is there any steps I am missing?
This would be how the scene now looks like:

Thanks
I am trying to make two objects(ogrenewt body) joining together by hinge joint when they collide in a contact callback function, I just simply use the following line to make the joint:
joint = new OgreNewt::BasicJoints::Hinge( mWorld, m_body0 , m_body1, Ogre::Vector3(30,0,0), Ogre::Vector3(0,1,0) );
The second last parameter is how far is the joint from the body (30 is the radius of the ball) , and the last parameter is the direction of the pin right (look down in the y-axis)
Can anyone tell me is there any steps I am missing?
This would be how the scene now looks like:
Thanks