Hi Everybody!!
It is my first project with Box2d. Everything works perfect, but I have one problem with b2DistanceJoint. It looks really strange.
I am creating joint in this code:
I create some boxes an connect them with b2DistanceJoint in this function. Everything works ok when I first pass small box and next horizontal box (green on screen). When I pass boxes in diferrent order small box starts to behave strange. It sticks to other objects or even push them (box marked with arrow should hang straight down, but it moves left). Maybe anyone had simillar problems?
I know, that maybe it is problem caused by other parts of my code...
I am using version: Version 2.0.0
Here is screenshot of my application.

It is my first project with Box2d. Everything works perfect, but I have one problem with b2DistanceJoint. It looks really strange.
I am creating joint in this code:
Code:
public function addJoint(b1, b2: b2Body, xy1, xy2: b2Vec2): void{
var jointDef: b2DistanceJointDef = new b2DistanceJointDef();
jointDef.Initialize(b1, b2, xy1, xy2);
jointDef.collideConnected = true;
m_world.CreateJoint(jointDef);
}
var jointDef: b2DistanceJointDef = new b2DistanceJointDef();
jointDef.Initialize(b1, b2, xy1, xy2);
jointDef.collideConnected = true;
m_world.CreateJoint(jointDef);
}
I create some boxes an connect them with b2DistanceJoint in this function. Everything works ok when I first pass small box and next horizontal box (green on screen). When I pass boxes in diferrent order small box starts to behave strange. It sticks to other objects or even push them (box marked with arrow should hang straight down, but it moves left). Maybe anyone had simillar problems?
I know, that maybe it is problem caused by other parts of my code...
I am using version: Version 2.0.0
Here is screenshot of my application.
