Hi everyone.
Maybe someone have this problem and found it solution:
i create 3 DistanceJoint between player body and wall:
When i destroy one of it, player body begins to move up and down - i like that, but I need so it stopped a couple of repetitions up\down.
World didnt have gravity, so it never stopped=(
1.
Also count of distanceJoint can be more that 3…
This is code of my DistanceJoint
DistanceJointDef distanceJointDef = new DistanceJointDef();
distanceJointDef.bodyA = someWall;
distanceJointDef.localAnchorA.set(someWallLocalAnchor);
distanceJointDef.bodyB = playerBody;
distanceJointDef.localAnchorB.set(playerLocalAnchor);
distanceJointDef.collideConnected = true;
distanceJointDef.frequencyHz = 0.8f;
distanceJointDef.dampingRatio= 0.4f;