Can someone help me with Trebuchet ?

Topics: Developer Forum
Sep 13, 2010 at 4:49 PM

I need to create Trebuchet for my game, and really i'm going nut. I was making it for 5 days and without success.

First of all I created rope on the end of rectangle which will hold the ball, and when I rotated rectangle, the rope was stretching and that's not what I want ...

Second I created rope out of one Revolute Joint, but when I touched the solid ground the ball at the end of it wouldn't move ...

I lost my eyes on box2D manual and farseer discussions to find what I need, really I'm desperate :(

If there is anyone who would like to help me, give me directions or little Trebuchet source or just part of it, i would be so happy and grateful ...

Please help in any way ...

Mercury

Coordinator
Sep 14, 2010 at 12:30 AM

Have you tried the distance joint? if you need a more realistic behavior, try creating a chain of links using the distance joint. The distance joint is rigid as long as you don't touch the frequency and damping properties.

Sep 14, 2010 at 10:40 AM
Edited Sep 14, 2010 at 10:53 AM
genbox wrote:

Have you tried the distance joint? if you need a more realistic behavior, try creating a chain of links using the distance joint. The distance joint is rigid as long as you don't touch the frequency and damping properties.

I tried distance joint, i didn't touch any of the attributes you said but it's the same ... I don't know what I'm doing wrong ...

The chain itself was made based on bridge test, also I found on box2D forums pretty much the same setup ...

Here's the image that shows how chain looks before and after rotation

http://i.imagehost.org/0046/explenation.png

 

I'm puzzled ? I mean I know box2d pretty well, I used it with AS3 and c++, but this is literally giving me a headache ...

Can anyone please create me a chain attached to the pole that rotates without stretching before I lose my mind ...

Really I need this, I'm reaching the deadline so I'm dead if I can't do it soon ...

Coordinator
Sep 14, 2010 at 12:24 PM

The joints are solved by an iterative solver, this means they will stretch when force is applied. You can minimize this by lowering the density of objects attached to the joints and up the number of iterations (inside Settings.cs)