# Box2D Forums

 It is currently Fri May 24, 2013 8:18 am

 All times are UTC - 8 hours [ DST ]

 Page 1 of 1 [ 6 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Distance JointPosted: Thu Nov 17, 2011 12:22 pm

Joined: Thu Nov 17, 2011 12:12 pm
Posts: 3
Hi,
I am trying to recreate a very simple rope using box2dflash. I have simulated the rope by joining a bunch of squares each connected by a distance joint. The very top square is then connected to a static block at the top so as to give the effect of a rope hanging from the ceiling.

The problem is that if I move the very bottom square it causes an elastic effect and the rope bounces up and down in an elastic fashion, causing the joints to stretch. All the squares are of equal density. Strangely, if I reduce the number of squares to like 10, then this problem goes away but returns when I use 40 or so squares.

How can I maintain a fixed distance between the joints and stop this 'springy' effect? I thought the distance joint was supposed to maintain a fixed distance between the bodies?

Thanks!

Top

 Post subject: Re: Distance JointPosted: Thu Nov 17, 2011 1:12 pm

Joined: Sun Oct 25, 2009 3:28 am
Posts: 242
Joints are not always completely rigid (though it's had a big improvement since 3 years ago), and given enough weight, they will stretch a bit (even weld, I believe, if there's enough force).

Top

 Post subject: Re: Distance JointPosted: Thu Nov 17, 2011 9:22 pm

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1517
Location: Tokyo
You could connect the first and last bodies with a rope joint, this would give an extra constraint to the 'rope' as a whole and would improve the stretching a lot.
There is an example in the testbed.

Top

 Post subject: Re: Distance JointPosted: Fri Nov 18, 2011 2:28 am

Joined: Thu Nov 17, 2011 12:12 pm
Posts: 3
Thanks for the suggestions. Where can I find the testbed?

Top

 Post subject: Re: Distance JointPosted: Fri Nov 18, 2011 2:54 am

Joined: Thu Nov 17, 2011 12:12 pm
Posts: 3
Its ok, ive found it.

Top

 Post subject: Re: Distance JointPosted: Fri Dec 02, 2011 1:55 am

Joined: Fri Dec 02, 2011 1:46 am
Posts: 1
Hi there,

I can't find the example. You mean actionscript or c++ examples with the testbed?
I try to connect the first and the last element of my robe, but it doesn't work for me

I only want to hang up some cards on a robe (look at the attachment)
but the cards are allway bouncing at start

Thanks!

 Attachments: File comment: example Unbenannt-2.jpg [ 7.69 KiB | Viewed 1429 times ]
Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 6 posts ]

 All times are UTC - 8 hours [ DST ]

#### Who is online

Users browsing this forum: Exabot [Bot] and 3 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 Search for: