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'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