|
@@ -191,7 +191,10 @@
|
|
//set the collideConnected flag after the creation, since DistanceJoint ignores it.
|
|
//set the collideConnected flag after the creation, since DistanceJoint ignores it.
|
|
constraint.collideConnected = !!jointData.collision
|
|
constraint.collideConnected = !!jointData.collision
|
|
impostorJoint.joint.physicsJoint = constraint;
|
|
impostorJoint.joint.physicsJoint = constraint;
|
|
- this.world.addConstraint(constraint);
|
|
|
|
|
|
+ //don't add spring as constraint, as it is not one.
|
|
|
|
+ if(impostorJoint.joint.type !== PhysicsJoint.SpringJoint) {
|
|
|
|
+ this.world.addConstraint(constraint);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
public removeJoint(joint: PhysicsImpostorJoint) {
|
|
public removeJoint(joint: PhysicsImpostorJoint) {
|