Page 1 of 1

Which constraint to keep a fixed distance between bodies?

Posted: Thu Feb 21, 2013 8:00 am
by ashwin
I have two spheres which should always lie at a constant distance from each other. They can move around with all degrees of freedom as long as their distance remains constant. Imagine them to be connected magically by an invisible rod. Various forces are applied on these spheres during a physical simulation to move them around.

I am using two Bullet SphereShapes for the spheres. What kind of constraint (joint) can I use between these two spheres to simulate their constant distance and connection?

It seems to me that I need to introduce a virtual shape (cylinder? capsule?) to connect these two spheres and introduce a spherical constraint (ball-and-socket joint) at each of its two ends to connect to the spheres.

Is there a better way to achieve this setup? What kind of constraint do I use?

Re: Which constraint to keep a fixed distance between bodies

Posted: Thu Feb 21, 2013 8:44 pm
by majestik666
Point2Point constraint is what you want