Elastic Rope and rotation - which is the best?

Discuss issues specific to the Flash/AS3 port of Box2D
giraz
Posts: 37
Joined: Tue Nov 18, 2008 3:37 am

Elastic Rope and rotation - which is the best?

Postby giraz » Wed Mar 18, 2009 4:06 am

Hi All,

I read a couple of post about this but still I am not sure what is the best combination of joint to get some kind of elestic but with some kind of control over the rotation.

So far I've tried two types of "ropes" with attached a body at the very bottom.

One rope is made with several b2RevoluteJoints:
- this is is great because I can play with the lowerAngle and upperAngle and change the rope behavior.
- at the same time it is not elastic and I can't stretch the rope at all if I drag the attached body with the mouse.

The other "rope" is more an elastic and is made with several small bodies connected by b2DistanceJoints.
- this one looks very very nice because of the elastic feeling
- but I don't have much control over the rotation of each joint


Two questions:
1- Ideally I would like to be able to have an elastic rope (as my b2DistanceJoints one) but also control somehow the rotation that every joint so that it looks more or less rigid. Any suggestion?

2 -considering two point connected by a distance joint (or any joint that let me play with two body as an elastic). Point "A" is attached to the ground (static body), and point "B" is attached on a dynamic body. How can I control the max rotation of the dynamic body relative to point B ?


Hope it makes sense.

Thanks a lot,
Riccardo

giraz
Posts: 37
Joined: Tue Nov 18, 2008 3:37 am

Re: Elastic Rope and rotation - which is the best?

Postby giraz » Thu Mar 19, 2009 4:56 am

Alright, I managed to get a bit more control over the rotation combining revolute joints and distance joints.

Still I am not sure where the elastic effect comes from since the distance joint I guess should guarantee a fix distance. Also it has no motor then I am wondering why does it stretches and how can I control it?

cheeesus
Posts: 1
Joined: Sun Jan 15, 2012 11:44 am

Re: Elastic Rope and rotation - which is the best?

Postby cheeesus » Sun Jan 15, 2012 11:45 am

You ever found an answer to this? I'm wondering about the same.

Thank you!


Return to “Flash”



Who is online

Users browsing this forum: Baidu [Spider] and 3 guests