From ffb128cd0d827fef83c94fea69a425c65c342fbe Mon Sep 17 00:00:00 2001 From: liabru Date: Sun, 15 Jan 2017 16:08:06 +0000 Subject: [PATCH] change Matter.MouseConstraint to use engine beforeUpdate event, closes #73 --- src/constraint/MouseConstraint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constraint/MouseConstraint.js b/src/constraint/MouseConstraint.js index f6879b59..fa1734af 100644 --- a/src/constraint/MouseConstraint.js +++ b/src/constraint/MouseConstraint.js @@ -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);