This project has moved and is read-only. For the latest updates, please go here.

Prohibit springs from passing each other

Mar 12, 2009 at 7:13 PM
Imagine 3 bodies and 3 linear springs connecting them.  If I grab a body with the mouse I am able to pass one of the bodies completely between the other two.




Is there a way of stopping this?  I want to stop A from passing between B and C because there is a spring between B and C.
Mar 12, 2009 at 9:02 PM

A spring has no geometry, so it cannot cause collision. The answer to your problem has to be found in your creativity.
Maybe increase the spring constant, so B and C cannot be pulled away from eachother far enough to let A pass. Or put a (number of) Geom(s) in between them. Like a chain.
Mar 14, 2009 at 12:20 AM
I was going to suggest the chain as well
And if you do not want to see the squares or you want it to collide with an invisible spring,
just make bodies and geomtries but do not draw the texture in the draw method.

Not sure if that would work but in theory it sounds good : )