[ODE] Maintaining a static body while using a hinge2

Megan Fox shalinor at gmail.com
Tue Jan 11 13:35:54 MST 2005


It is, indeed, a problem with the hinge-2 joint specifically - though
I can see why you'd miss it entirely:

"
void dJointAttach (dJointID, dBodyID body1, dBodyID body2);

Attach the joint to some new bodies. If the joint is already attached,
it will be detached from the old bodies first. To attach this joint to
only one body, set body1 or body2 to zero - a zero body refers to the
static environment. Setting both bodies to zero puts the joint into
"limbo", i.e. it will have no effect on the simulation.

Some joints, like hinge-2 need to be attached to two bodies to work."


... why this note is in the dJointAttach doc and not the Hinge-2 doc,
I do not know.



It seems as if you could duplicate the behavior you're aiming at with
a hinge joint, though, which you seem to already have discovered.

-Megan Fox

> I actually tried this, but I ran into problems when the joint was a
> hinge2. I'm not sure if it is a problem with hinge2 joints or not, but
> I couldn't get it to work...


More information about the ODE mailing list