mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-27 09:50:52 -05:00
fixed Body.setStatic
This commit is contained in:
parent
3065667125
commit
5f3e69cb70
1 changed files with 8 additions and 0 deletions
|
@ -118,6 +118,14 @@ var Body = {};
|
||||||
body.mass = body.inertia = body.density = Infinity;
|
body.mass = body.inertia = body.density = Infinity;
|
||||||
body.inverseMass = body.inverseInertia = 0;
|
body.inverseMass = body.inverseInertia = 0;
|
||||||
body.render.lineWidth = 1;
|
body.render.lineWidth = 1;
|
||||||
|
|
||||||
|
body.positionPrev.x = body.position.x;
|
||||||
|
body.positionPrev.y = body.position.y;
|
||||||
|
body.anglePrev = body.angle;
|
||||||
|
body.angularVelocity = 0;
|
||||||
|
body.speed = 0;
|
||||||
|
body.angularSpeed = 0;
|
||||||
|
body.motion = 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue