Which constraint to keep a fixed distance between bodies?

Post Reply
ashwin
Posts: 1
Joined: Thu Feb 21, 2013 7:24 am

Which constraint to keep a fixed distance between bodies?

Post 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?
User avatar
majestik666
Posts: 66
Joined: Tue Mar 02, 2010 6:13 am

Re: Which constraint to keep a fixed distance between bodies

Post by majestik666 »

Point2Point constraint is what you want
Post Reply