Page 1 of 1
"combining" objects with joints
Posted: Mon Jun 29, 2009 8:11 am
by vulh102
Hi!
i want to fixate two bodies too eachother through the use of a joint.
i thought that i should be using the pin joint, but it gives wierd results.
the effect im after is that i want the two objects to seem like a single object.
i tested with the pivot joint and that works as expected.
Re: "combining" objects with joints
Posted: Mon Jun 29, 2009 8:26 am
by solmead
The pin joint is like fixing a rod/bar between the two objects with the end points of this "rod" being the points you specify. As you found out much better to use a pivot joint for this.
Re: "combining" objects with joints
Posted: Mon Jun 29, 2009 8:30 am
by maximile
It's usually better to add the shapes of the two bodies to one body instead. That'll be faster and more stable.
Some people have faked it using two crossed pin joints.
Re: "combining" objects with joints
Posted: Mon Jun 29, 2009 9:10 am
by vulh102
how hard would it be to add a new joint?
i am working on a physics editor, so adding the shapes to a shared body will complicate other tools, and using crossed pins just seems hackish
seems wierd that a fixed joint isnt implemented ; they exist in every other physics lib
Re: "combining" objects with joints
Posted: Mon Jun 29, 2009 9:47 am
by slembcke
It wouldn't really be that hard to add, but locking multiple objects together using a joint is most certainly going to be more "hackish" than putting them together on the same body. The reason is that it takes extra CPU time to make the joint work, and on top of that constraining two bodies together like that will never be as solid.