File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,18 +260,19 @@ var Axes = require('../geometry/Axes');
260260 Body . setStatic = function ( body , isStatic ) {
261261 for ( var i = 0 ; i < body . parts . length ; i ++ ) {
262262 var part = body . parts [ i ] ;
263- part . isStatic = isStatic ;
264263
265264 if ( isStatic ) {
266- part . _original = {
267- restitution : part . restitution ,
268- friction : part . friction ,
269- mass : part . mass ,
270- inertia : part . inertia ,
271- density : part . density ,
272- inverseMass : part . inverseMass ,
273- inverseInertia : part . inverseInertia
274- } ;
265+ if ( ! part . isStatic ) {
266+ part . _original = {
267+ restitution : part . restitution ,
268+ friction : part . friction ,
269+ mass : part . mass ,
270+ inertia : part . inertia ,
271+ density : part . density ,
272+ inverseMass : part . inverseMass ,
273+ inverseInertia : part . inverseInertia
274+ } ;
275+ }
275276
276277 part . restitution = 0 ;
277278 part . friction = 1 ;
@@ -296,6 +297,8 @@ var Axes = require('../geometry/Axes');
296297
297298 part . _original = null ;
298299 }
300+
301+ part . isStatic = isStatic ;
299302 }
300303 } ;
301304
You can’t perform that action at this time.
0 commit comments