Chain/Rope implementation
Posted: Sun Mar 10, 2013 10:08 pm
Hi All!
I'm working on a new game where you control a crane. From the crane there is a chain attached and under it a hook that can attach to objects.
I want the chain to be able to collide with other objects so it seems realistic. That pretty much rules out a single DistanceLimit as it cannot collide with objects.
Now I've started to make a chain with small boxes and RevoluteJoints (stole the idea from the bridge demo). As long as I make the hook in the end a bit heavier than the rest it seems to behave ok.
The issue is when I want to make the chain longer or shorter, then I need to remove or add items from the link of RevoluteJoints which is a bit tedious. Is there are better way to do it?
Any feedback is appreciated!
I'm working on a new game where you control a crane. From the crane there is a chain attached and under it a hook that can attach to objects.
I want the chain to be able to collide with other objects so it seems realistic. That pretty much rules out a single DistanceLimit as it cannot collide with objects.
Now I've started to make a chain with small boxes and RevoluteJoints (stole the idea from the bridge demo). As long as I make the hook in the end a bit heavier than the rest it seems to behave ok.
The issue is when I want to make the chain longer or shorter, then I need to remove or add items from the link of RevoluteJoints which is a bit tedious. Is there are better way to do it?
Any feedback is appreciated!