Skip to content

Commit

Permalink
change Matter.MouseConstraint to use engine beforeUpdate event, closes
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Jan 15, 2017
1 parent 68382d6 commit ffb128c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/constraint/MouseConstraint.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var Bounds = require('../geometry/Bounds');

var mouseConstraint = Common.extend(defaults, options);

Events.on(engine, 'tick', function() {
Events.on(engine, 'beforeUpdate', function() {
var allBodies = Composite.allBodies(engine.world);
MouseConstraint.update(mouseConstraint, allBodies);
_triggerEvents(mouseConstraint);
Expand Down

0 comments on commit ffb128c

Please sign in to comment.