[ODE] swinging hinge joint

Wesley Smith wesley.hoke at gmail.com
Sun Apr 23 23:19:01 MST 2006


Ok,
So I've figured out my problem after looking at different example
codes.  My original code:

//make hinge joint between sphere and world
dJointID jid =  dJointCreateHinge(m_grainWorld, 0);
dJointSetHingeAnchor(jid, 0.f, 3.5f, 0.f);
dJointSetHingeAxis(jid, 1.f, 0.f, 0.f);
dJointAttach(jid, m_grains[0].bodyID(), 0);


attaches the joint after setting the joint anchor and axis. 
Apparently, ODE requires the joint to be attached before setting these
values.  This makes sense.  After re-reading the joint docs, I see
that this was implied although not explicitly spelled out.

best,
wes



More information about the ODE mailing list