Skip to content

Commit 2c52584

Browse files
committed
The Arcade Physics Body _tempMatrix property has been removed. It was only used if the Body's Game Object had a parent. The matrix has been moved to the World instance instead, shared by all bodies.
1 parent 5c091f4 commit 2c52584

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/physics/arcade/Body.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ var CONST = require('./const');
1010
var RadToDeg = require('../../math/RadToDeg');
1111
var Rectangle = require('../../geom/rectangle/Rectangle');
1212
var RectangleContains = require('../../geom/rectangle/Contains');
13-
var TransformMatrix = require('../../gameobjects/components/TransformMatrix');
1413
var Vector2 = require('../../math/Vector2');
1514

1615
/**
@@ -761,8 +760,6 @@ var Body = new Class({
761760
* @since 3.0.0
762761
*/
763762
this._bounds = new Rectangle();
764-
765-
this._tempMatrix = new TransformMatrix();
766763
},
767764

768765
/**
@@ -781,7 +778,7 @@ var Body = new Class({
781778

782779
if (sprite.parentContainer)
783780
{
784-
var matrix = sprite.getWorldTransformMatrix(this._tempMatrix);
781+
var matrix = sprite.getWorldTransformMatrix(this.world._tempMatrix, this.world._tempMatrix2);
785782

786783
transform.x = matrix.tx;
787784
transform.y = matrix.ty;

0 commit comments

Comments
 (0)