From d884fd0468d63cb45db3a8d5d981ad0a72c28bc4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 17:03:50 +0000 Subject: [PATCH] Handle scaled bodies properly --- src/physics/matter-js/components/SetBody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index 2b1503e5e..780bd0973 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -155,7 +155,7 @@ var SetBody = { var cx = body.centerOffset.x; var cy = body.centerOffset.y; - this.setOrigin(rx + (cx / this.width), ry + (cy / this.height)); + this.setOrigin(rx + (cx / this.displayWidth), ry + (cy / this.displayHeight)); } return this;