Commit 37840863 authored by Viktor Lidholt's avatar Viktor Lidholt

Break sprite physics joints

parent 2d2b4a8a
...@@ -79,6 +79,11 @@ class PhysicsNode extends Node { ...@@ -79,6 +79,11 @@ class PhysicsNode extends Node {
body._node._setRotationFromPhysics(degrees(b2Body.getAngle())); 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 // Remove bodies that were marked for destruction during the simulation
_removeBodiesScheduledForDestruction(); _removeBodiesScheduledForDestruction();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment