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.

This commit is contained in:
Richard Davey 2018-08-29 16:06:13 +01:00
parent 5c091f4ff9
commit 2c525845be

View file

@ -10,7 +10,6 @@ var CONST = require('./const');
var RadToDeg = require('../../math/RadToDeg');
var Rectangle = require('../../geom/rectangle/Rectangle');
var RectangleContains = require('../../geom/rectangle/Contains');
var TransformMatrix = require('../../gameobjects/components/TransformMatrix');
var Vector2 = require('../../math/Vector2');
/**
@ -761,8 +760,6 @@ var Body = new Class({
* @since 3.0.0
*/
this._bounds = new Rectangle();
this._tempMatrix = new TransformMatrix();
},
/**
@ -781,7 +778,7 @@ var Body = new Class({
if (sprite.parentContainer)
{
var matrix = sprite.getWorldTransformMatrix(this._tempMatrix);
var matrix = sprite.getWorldTransformMatrix(this.world._tempMatrix, this.world._tempMatrix2);
transform.x = matrix.tx;
transform.y = matrix.ty;