Box2D Forums

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

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Distance Joint
PostPosted: Thu Nov 17, 2011 12:22 pm 
Offline

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
 Profile  
 
 Post subject: Re: Distance Joint
PostPosted: Thu Nov 17, 2011 1:12 pm 
Offline

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
 Profile  
 
 Post subject: Re: Distance Joint
PostPosted: Thu Nov 17, 2011 9:22 pm 
Offline

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
 Profile  
 
 Post subject: Re: Distance Joint
PostPosted: Fri Nov 18, 2011 2:28 am 
Offline

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


Top
 Profile  
 
 Post subject: Re: Distance Joint
PostPosted: Fri Nov 18, 2011 2:54 am 
Offline

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


Top
 Profile  
 
 Post subject: Re: Distance Joint
PostPosted: Fri Dec 02, 2011 1:55 am 
Offline

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
Unbenannt-2.jpg [ 7.69 KiB | Viewed 1429 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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 forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group