Unstable b2RevoluteJoint

Discuss issues specific to using Box2D on the iPhone
KAMIKAZE
Posts: 17
Joined: Thu Jun 28, 2012 1:57 am

Unstable b2RevoluteJoint

Postby KAMIKAZE » Wed Dec 17, 2014 12:02 pm

Hello,

here is my problem, please see video: https://www.youtube.com/watch?v=UFXye1mMr04

When biggest body pushes my rope - it becomes crazy. I need to use mousejoint in my game and user can grab big object and hit that rope.
If I increase size of each rope element I can fix this, however I need even less size objects in my game. And I need them stable.
I know that box2d works not very well with small size objects, but I see in some games a thin ropes and all works well.
Can someone please help me with my problem?

irresistible force
Posts: 1991
Joined: Tue Jun 24, 2008 8:25 pm
Location: Tokyo
Contact:

Re: Unstable b2RevoluteJoint

Postby irresistible force » Wed Dec 17, 2014 9:07 pm

It's not the size, so much as the relative mass of the bodies that causes this. The heavier block has more 'authority' to tell the lighter ones where to go. Each joint in the chain must go to where each of its neighbors tells it to go, which is fine until it also has to go where the large block says to go, and then there are conflicting 'instructions'. The larger block will be obeyed more because it is heavier.
You could try connecting each individual body of the rope to the top (static body).

KAMIKAZE
Posts: 17
Joined: Thu Jun 28, 2012 1:57 am

Re: Unstable b2RevoluteJoint

Postby KAMIKAZE » Thu Dec 18, 2014 12:32 am

What you mean by connecting to the top? Hmm.. Something like distance joint? But how..? I need normal rope behavior and stable.

irresistible force
Posts: 1991
Joined: Tue Jun 24, 2008 8:25 pm
Location: Tokyo
Contact:

Re: Unstable b2RevoluteJoint

Postby irresistible force » Fri Dec 19, 2014 9:22 pm

The 'top' is the static body that the first (uppermost) rope segment body is attached to. You could use rope joints.
Explained here: http://youtu.be/6y5Ka5IjhpY

KAMIKAZE
Posts: 17
Joined: Thu Jun 28, 2012 1:57 am

Re: Unstable b2RevoluteJoint

Postby KAMIKAZE » Sat Dec 20, 2014 4:05 am



Return to “iPhone”



Who is online

Users browsing this forum: No registered users and 1 guest