Making rope with ball.

Topics: Developer Forum, Project Management Forum, User Forum
Oct 22, 2010 at 7:32 AM

Howdy, everybody.

I am gonna to make the rope that has a ball in the end of it.

Is it possible?

I mean I wanna to make the ball swinging to the rope.

Oct 22, 2010 at 2:47 PM

Yes it is possible.

Check the path factory. Plus check in this same forum, where I think there is a couple of examples on how to make a rope (they are in Farseer 2.1, but you will get an idea).

Developer
Oct 22, 2010 at 2:59 PM

Also I will be porting over the new Rope Joint from the latest Box2D revision and that should help with keeping the rope from stretching.

Oct 22, 2010 at 3:14 PM

When are you going to port it?

after finishing the porting it, can you give me the result?

Developer
Oct 22, 2010 at 3:44 PM

It should be ready in the next week or two. It will be added into the source control for now, and won't be officially released until 3.1 is done.

Basically all the joint does is limit the maximum distance between two objects. You would create a normal rope and then attach this joint to the start and end.

Oct 24, 2010 at 12:03 PM

You can also use the SliderJoint, which is in the source control now (not sure if it was in the original release though).

You can make it bouncy and elastic by adjusting the DampingRatio and Frequency. The Box2D manual explains how to adjust those values properly, as it can take a bit of tweaking to get right.

Oct 25, 2010 at 1:35 AM
Thank you.
I have already done it.
Developer
Oct 25, 2010 at 1:55 AM

The Slider Joint will work but it can be hard to tune properly. I have already ported Rope Joint and it will be available in the next day or two. It offers a very stiff distance joint with no tuning necessary. I have also ported over the test into the TestBed Framework so you can see how much of a difference it can make.  It will be very easy to switch to the RopeJoint once I add it to the source control.