We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5b535d commit a20a9fbCopy full SHA for a20a9fb
1 file changed
src/collision/Grid.js
@@ -62,8 +62,8 @@ var Common = require('../core/Common');
62
continue;
63
64
// don't update out of world bodies
65
- if (body.bounds.max.x < 0 || body.bounds.min.x > world.bounds.width
66
- || body.bounds.max.y < 0 || body.bounds.min.y > world.bounds.height)
+ if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x
+ || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y)
67
68
69
var newRegion = _getRegion(grid, body);
0 commit comments