PJani
29-10-2009 18:23:51
Hy can someone test Slider Joint if it is working with Newton 2.09 and latest OgreNewt?
Becouse it looks like joint doesnt hold two bodies together in my case...
kallaspriit
22-11-2009 19:02:25
You are corrent, tried using the built-in joints and they don't work. It seems to get "fixed" by commenting out userdata calls:
Hinge::Hinge( const World* world, const OgreNewt::Body* child, const OgreNewt::Body* parent, const Ogre::Vector3& pos, const Ogre::Vector3& pin ) : Joint()
{
m_world = world;
if (parent)
{
m_joint = NewtonConstraintCreateHinge( world->getNewtonWorld(), &pos.x, &pin.x,
child->getNewtonBody(), parent->getNewtonBody() );
}
else
{
m_joint = NewtonConstraintCreateHinge( world->getNewtonWorld(), &pos.x, &pin.x,
child->getNewtonBody(), NULL );
}
//NewtonJointSetUserData( m_joint, this ); // uncommenting this breaks the joint again
//NewtonJointSetDestructor( m_joint, destructor );
//NewtonHingeSetUserCallback( m_joint, newtonCallback );
//m_callback = NULL;
}
This definitely should not happen, I will investigate.