Page 1 of 1

Ruby Chipmunk / Gosu Joints

Posted: Fri Jan 09, 2009 2:21 pm
by Basic
Hi guys,

I'm having a little bit of trouble with joints. I've been trying to create a rope bridge type thing. What I've done is make alot of rectangles and attach them all via a pin joint. it works right up until something lands on the bridge. and the joint seems to separate and the object will fall between the rectangles. I've tried making the joint actually in the rectangle and turning collisions off for the bridge segments, but the same thing happens. have I at least got the understanding right about the pin joint, I supply two bodies, and two anchor points, one for each body? and the two objects will be stapled at those points?

PS: having alot of fun with Gosu/Chipmunk, thanks Chipmunk :)

Re: Ruby Chipmunk / Gosu Joints

Posted: Sun Jan 11, 2009 6:49 am
by supertommy
Does it help if you increase the mass of the bridge segments?

You could also try increasing the biasCoef on the joints or increasing the number of iterations in your space.

As for what the pin joint does - it keeps those anchor points at a fixed distance from each other. This is not unreasonable for a bridge, but the pivot joint would probably work fine too. See the documentation at http://code.google.com/p/chipmunk-physics/wiki/cpJoint