We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d082b3a commit 9d3755aCopy full SHA for 9d3755a
1 file changed
src/body/Body.js
@@ -110,16 +110,16 @@ var Body = {};
110
* @param {} options
111
*/
112
var _initProperties = function(body, options) {
113
- // init required properties
+ // init required properties (order is important)
114
Body.set(body, {
115
bounds: body.bounds || Bounds.create(body.vertices),
116
positionPrev: body.positionPrev || Vector.clone(body.position),
117
anglePrev: body.anglePrev || body.angle,
118
vertices: body.vertices,
119
+ parts: body.parts || [body],
120
isStatic: body.isStatic,
121
isSleeping: body.isSleeping,
- parent: body.parent || body,
122
- parts: body.parts
+ parent: body.parent || body
123
});
124
125
Vertices.rotate(body.vertices, body.angle, body.position);
0 commit comments