Break sprite physics joints

This commit is contained in:
Viktor Lidholt
2015-10-12 16:54:58 -07:00
parent 2d2b4a8a58
commit 3784086322

View File

@@ -79,6 +79,11 @@ class PhysicsNode extends Node {
body._node._setRotationFromPhysics(degrees(b2Body.getAngle()));
}
// Break joints
for (PhysicsJoint joint in _joints) {
joint._checkBreakingForce(dt);
}
// Remove bodies that were marked for destruction during the simulation
_removeBodiesScheduledForDestruction();
}