0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-31 18:14:55 -05:00

Fix #641 - Calling Body.setStatic(body, true) twice breaks the body

This commit is contained in:
Vigneshkumar Chinnachamy M 2020-05-28 13:47:39 +05:30
parent 5a0079df1b
commit 610bd73053

View file

@ -249,6 +249,11 @@ var Axes = require('../geometry/Axes');
Body.setStatic = function(body, isStatic) {
for (var i = 0; i < body.parts.length; i++) {
var part = body.parts[i];
if (part.isStatic === isStatic) {
continue;
}
part.isStatic = isStatic;
if (isStatic) {