File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1187,18 +1187,13 @@ var World = new Class({
11871187
11881188 if ( body . allowGravity )
11891189 {
1190- var gravityX = ( this . gravity . x + body . gravity . x ) * delta ;
1191- var gravityY = ( this . gravity . y + body . gravity . y ) * delta ;
1190+ // var worldBlocked = body.worldBlocked;
11921191
1193- if ( gravityX < 0 && ! body . worldBlocked . left || gravityX > 0 && ! body . worldBlocked . right )
1194- {
1195- velocityX += gravityX ;
1196- }
1192+ body . _gx = ( this . gravity . x + body . gravity . x ) * delta ;
1193+ body . _gy = ( this . gravity . y + body . gravity . y ) * delta ;
11971194
1198- if ( gravityY > 0 && ! body . worldBlocked . down || gravityY < 0 && ! body . worldBlocked . up )
1199- {
1200- velocityY += gravityY ;
1201- }
1195+ velocityX += body . _gx ;
1196+ velocityY += body . _gy ;
12021197 }
12031198
12041199 if ( accelerationX )
@@ -1610,7 +1605,7 @@ var World = new Class({
16101605
16111606 if ( ! body1 . isCircle && ! body2 . isCircle )
16121607 {
1613- return IntersectsRect ( body1 , body2 , 1 ) ;
1608+ return IntersectsRect ( body1 , body2 ) ;
16141609 }
16151610 else if ( body1 . isCircle )
16161611 {
You can’t perform that action at this time.
0 commit comments