Yet another "rope" dilemma

Hey all,
I'm trying to implement a rather simple "rope" model and I'm a bit stuck and banging my head on the wall so hoping for some help.

I don't need to visually represent the rope with box2d, but simply keep 2 objects at a certain maximum distance (no min. distance) and at the same time have both bodies freely moving and rotating in space.
The behavior would be exactly the one of a distance joint with an upper limit.

So far I've tried:
1) Creating two dummy bodies and attach them to body1 and body2 using revolute joints
2) Attach the two dummy bodies with a prismatic joint
I imagined that would give me the expected behavior but the two bodies just look like they have no joint at all.

Tried substituting the prismatic joint with a line joint (and removing the dummy bodies), which gives a vaguely similar effect but I'm probably misunderstanding the use of the axis, as the bodies rotate strangely according to orientation.

Any ideas or directions?
Thanks
I have a task to create a maximum distance joint. Until then you can fake it using a circular edge loop on the base body and a small frictionless circle on the end of the chain.
Thanks for the quick reply and suggestion Erin, and as always thanks for all the work and effort you put into box2d.

Unfortunately the solution you suggested wouldn't work too well in my scenario, I'm creating rather "complex" bridge structures with revolute+distance joints and was hoping to create a rope like joint to simulate suspension bridges.
I'll be looking forward to the maximum distance joint 🙂
patrick_c wrote:
I'll be looking forward to the maximum distance joint 🙂

+1 🙂
- Implemented b2RopeJoint that provides a maximum distance constraint. Please see the comments and Rope test for more information.

Command: Commit
Modified: D:\Development\Box2D\Box2D\Box2D\Box2D.h
Modified: D:\Development\Box2D\Box2D\Box2D\CMakeLists.txt
Modified: D:\Development\Box2D\Box2D\Box2D\Dynamics\Joints\b2Joint.cpp
Modified: D:\Development\Box2D\Box2D\Box2D\Dynamics\Joints\b2Joint.h
Adding: D:\Development\Box2D\Box2D\Box2D\Dynamics\Joints\b2RopeJoint.cpp
Adding: D:\Development\Box2D\Box2D\Box2D\Dynamics\Joints\b2RopeJoint.h
Modified: D:\Development\Box2D\Box2D\Box2D\Dynamics\b2Body.h
Modified: D:\Development\Box2D\Box2D\Testbed\CMakeLists.txt
Adding: D:\Development\Box2D\Box2D\Testbed\Tests\Rope.h
Modified: D:\Development\Box2D\Box2D\Testbed\Tests\TestEntries.cpp
Sending content: D:\Development\Box2D\Box2D\Box2D\Box2D.h
Sending content: D:\Development\Box2D\Box2D\Box2D\Dynamics\Joints\b2Joint.cpp
Sending content: D:\Development\Box2D\Box2D\Testbed\Tests\TestEntries.cpp
Sending content: D:\Development\Box2D\Box2D\Testbed\CMakeLists.txt
Sending content: D:\Development\Box2D\Box2D\Testbed\Tests\Rope.h
Sending content: D:\Development\Box2D\Box2D\Box2D\Dynamics\Joints\b2Joint.h
Sending content: D:\Development\Box2D\Box2D\Box2D\Dynamics\Joints\b2RopeJoint.cpp
Sending content: D:\Development\Box2D\Box2D\Box2D\CMakeLists.txt
Sending content: D:\Development\Box2D\Box2D\Box2D\Dynamics\b2Body.h
Sending content: D:\Development\Box2D\Box2D\Box2D\Dynamics\Joints\b2RopeJoint.h
Completed: At revision: 141
ooooooh is it Christmas already??

I somewhat sheepishly have to admit I had a crack at this myself on two occasions, it seemed so easy starting from the distance joint... but it was not to be 😀
Anyway, now I can go back and take out my wacky workarounds and replace them with something solid - thanks!
Oh I love you Erin!
A special kind of platonic love, of course.
Will get right on this, I'll have ropes in-game by this afternoon, will report back.
Thanks!
Thanks Erin, it works like a charm.

Couldn't resist attaching a video of the rope joint in-game.
http://cleverhamstergames.com/paperbridge-rope-box2d.mov
This is from Paper Bridge for iPhone/iPad.
Green beams are distance joints, blue beams are rope joints (visually drawn with verlet integration) and gray/brown beams are bodies+revolute joints to create the road structure.

Again, many thanks for this new joint 🙂
Thanks Erin!

Original thread: https://box2d.org/forum/viewtopic.php?t=5679