diff --git a/src/physics/matter-js/lib/body/Body.js b/src/physics/matter-js/lib/body/Body.js index 61230e033..cb668ed6b 100644 --- a/src/physics/matter-js/lib/body/Body.js +++ b/src/physics/matter-js/lib/body/Body.js @@ -741,6 +741,8 @@ var Axes = require('../geometry/Axes'); point = point || body.position; + var wasFixedRotation = (body.inertia === Infinity) ? true : false; + for (var i = 0; i < body.parts.length; i++) { var part = body.parts[i]; @@ -792,6 +794,11 @@ var Axes = require('../geometry/Axes'); body.circleRadius = null; } } + + if (wasFixedRotation) + { + Body.setInertia(body, Infinity); + } }; /**