# Chain - Is this possible or feasible?

I started to wonder how to implement sort of a necklace effect. There would be a line or chain and it would settle on the surface with gravity.

Should I divide this line/chain in to smaller pieces? And how to connect these links together? Is it reasonable to make it to be a complete loop so the first and the last are connected? This does not have to be lightning fast as I would prefer easy implementation  :roll:

Thanks a lot for tips, hints etc!

I’ve never done anything like that before, but I remember reading about rope physics and I think that close to what your looking for. NeHe has a good tutorial on that:

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=40

nymon said:

I've never done anything like that before, but I remember reading about rope physics and I think that close to what your looking for. NeHe has a good tutorial on that:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=40

It is pretty straightforward if you are going to use JMEPhysics, just set up a constraint between each link in the chain.

The math way isn't that bad either if you really wanted to do it yourself.

If you want a real chain, use universal joints between each link (and model each link as a body). You can make each link be a capsule; you don't need to (or even should) model the inter-collision between the chains in the inner cavity. Just make sure they don't collide with each other, only the ground/person/whatever!

If you want something more rope-like, that can twist, then you might want to use ball-and-socket joints instead.

If you get something together for this I'd love to see a video. :)  It would also be interesting to see how well it performs.