Skip to content

Commit f13bbca

Browse files
committed
Fix getWorldBounds clash
1 parent c571124 commit f13bbca

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/gameobjects/components/GetBounds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ var GetBounds = {
178178
// defined per corner we only do it once.
179179
if (this.parentContainer)
180180
{
181-
var parentMatrix = this.parentContainer.getWorldTransformMatrix();
181+
var parentMatrix = this.parentContainer.getBoundsTransformMatrix();
182182

183183
this.getTopLeft(output);
184184
parentMatrix.transformPoint(output.x, output.y, output);

src/gameobjects/components/Transform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ var Transform = {
406406

407407
if (!parent)
408408
{
409-
return tempMatrix();
409+
return this.getLocalTransformMatrix(tempMatrix);
410410
}
411411

412412
var parents = [];

src/gameobjects/container/Container.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,15 +407,15 @@ var Container = new Class({
407407
},
408408

409409
/**
410-
* Returns the world transform matrix.
410+
* Returns the world transform matrix as used for Bounds checks.
411411
* The returned matrix is a temporal and shouldn't be stored.
412412
*
413-
* @method Phaser.GameObjects.Container#getWorldTransformMatrix
413+
* @method Phaser.GameObjects.Container#getBoundsTransformMatrix
414414
* @since 3.4.0
415415
*
416416
* @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.
417417
*/
418-
getWorldTransformMatrix: function ()
418+
getBoundsTransformMatrix: function ()
419419
{
420420
var tempMatrix = this.tempTransformMatrix;
421421

0 commit comments

Comments
 (0)