Skip to content

Commit 08df6b4

Browse files
committed
Bug fix: wrong prop name
1 parent 7730af6 commit 08df6b4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/physics/matter-js/MatterTileBody.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ var MatterTileBody = new Class({
119119
if (!HasValue(options, "addToWorld")) { options.addToWorld = true; }
120120

121121
var bounds = this.tile.getBounds();
122-
var cx = bounds.x + (bounds.w / 2);
123-
var cy = bounds.y + (bounds.y / 2);
124-
var body = Bodies.rectangle(cx, cy, bounds.w, bounds.h, options);
122+
var cx = bounds.x + (bounds.width / 2);
123+
var cy = bounds.y + (bounds.height / 2);
124+
var body = Bodies.rectangle(cx, cy, bounds.width, bounds.height, options);
125125
this.setBody(body, options.addToWorld);
126126

127127
return this;

0 commit comments

Comments
 (0)