Skip to content

Commit

Permalink
Allow for negative force to bring a body out of sleeping state.
Browse files Browse the repository at this point in the history
  • Loading branch information
foligno committed Mar 4, 2015
1 parent f4f3bf7 commit d585e80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build/matter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* matter.js 0.8.0-edge 2015-01-21
* matter.js 0.8.0-edge 2015-03-03
* http://brm.io/matter-js/
* License: MIT
*/
Expand Down Expand Up @@ -5115,7 +5115,7 @@ var Sleeping = {};
motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed;

// wake up bodies if they have a force applied
if (body.force.x > 0 || body.force.y > 0) {
if (body.force.x != 0 || body.force.y != 0) {
Sleeping.set(body, false);
continue;
}
Expand Down Expand Up @@ -5172,7 +5172,7 @@ var Sleeping = {};
}
}
};

/**
* Description
* @method set
Expand Down
Loading

0 comments on commit d585e80

Please sign in to comment.