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

LinkFactory CreateChain

Topics: Developer Forum, User Forum
Apr 5, 2011 at 11:49 AM
Edited Apr 5, 2011 at 2:04 PM

I've searched all of the internet by now and have only been able to find either unsufficient or obsolete information on this.

I'm trying to connect 2 bodies with a chain. the first one controlling where the chain will go, the other one tug forth by it.

I have, however, No idea how to do this. this function returns a path from which I can only ask positions and not set, stuff like that.

any ideas? it would be greatly appreciated.


yours truly,


Apr 5, 2011 at 11:20 PM

Take a look inside the testbed. There are several chain implementations (bridges are also just "chains")

Apr 10, 2011 at 4:16 PM
Edited Apr 10, 2011 at 5:16 PM

thanks, I did check out testbed before, but for the path test.

however, what I was trying right now was using linkfactory, which did not give me the opportunity to aces the first and last link to joint them to my objects..

the chaintest in testbed does not use that though, so i'll just use that approach there and adapt it.

thanks tho!



Edit: oddly enough, once it's made, it spins on itself and does not stay connected to my two bodies.

here's how i'm trying to rightnow:

            //Attach chainlinks to player and seed.
            RevoluteJoint RevJoint = new RevoluteJoint(chainLinks[0], Robot.PlayerBody, chainLinks[0].Position, Robot.PlayerBody.Position);

            RevoluteJoint RevJoint2 = new RevoluteJoint(chainLinks[30], AtchSeed.SeedBody, chainLinks[30].Position, AtchSeed.SeedBody.Position);

any idea's where i'm going wrong?

Apr 13, 2011 at 3:36 PM

sorry for the bump but I hope someone can help me with this really quickly, as it's for an important deadline..

Apr 13, 2011 at 4:17 PM

Just take a look at the racing car sample's bridge. It uses a path and gets connected to the (static) world on its two end points.

Apr 13, 2011 at 4:50 PM

that's exactly the problem, I only get static examples, but I need the two enities that are tethered to move around.

Apr 13, 2011 at 5:00 PM

Well the rope joint test from the testbed has a cube attached to a rope. What is wrong with that? There are dozens of samples where two dynamic objects are connected with revolute joints (ragdoll, soft body, etc.) it shouldn't matter if one of the dynamic bodies is part of a chain or not...

Apr 13, 2011 at 5:20 PM

sincerest thanks for the pointers, and sorry again for bothering you, thoug hI had spit out the entire testbed by now, I didn't want to bother you guys for nothing. Turns out the problem is an obsolete function that was being used.

I think i'll get it working now! Thanks again!