I'm trying to create 2D rope. Chain based solution is not working pretty well, so I'm looking for new approach. Every good looking rope implementation is based on verlet integration, but this method is not good for rigid body based system. Is there any save method to combine these methods - ropes with verlet and rigid bodies with Euler? Basic requirement for method I'm looking for is proper (or good enough) collision detection for both of simulated bodies.
1 Answer
What I am trying to offer here is not exactly what you described, but could be "good enough".
The proper rope will be pretty an interesting challenge that will take some time to tackle.
I don't think that's what you need/want nor do I have such excellency to offer the solution. Instead I thought I leave you with more of "cheat"; this is how I would have done it if I needed "rope" in rigid body based system.
Gist is : Since you are in this rigid body system world, why don't you just make rope out of rigid as well?
Here let me explain what I mean with picture.
You could set boxs(red) to have fixed maximum length L to box next to it, then just let them roll in the world. This will be visually less appealing option to you. So here, you just hide those boxs from user, then instead draw a rope like visual effect(blue line that's going across the red boxs) onto it. Example below.
(in this picture, rope like visual is drawn based off of location of blue box. here in this example, the visual effect rope has many nodes to give it more fluid feeling)
For your rigid body rope, you will want to have many small boxs that compose the rope in order to gain more rope like behavior.
provot approach
) \$\endgroup\$