We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69edda9 commit 395e4d0Copy full SHA for 395e4d0
1 file changed
src/physics/arcade/Body.js
@@ -963,18 +963,19 @@ var Body = new Class({
963
update: function (delta)
964
{
965
var velocity = this.velocity;
966
+ var position = this.position;
967
968
if (this.moves)
969
970
this.world.updateMotion(this, delta);
971
- this.position.x += this.getMoveX(velocity.x * delta);
972
- this.position.y += this.getMoveY(velocity.y * delta);
+ position.x += this.getMoveX(velocity.x * delta);
973
+ position.y += this.getMoveY(velocity.y * delta);
974
}
975
976
// Calculate the delta
- this._dx = this.position.x - this.prev.x;
977
- this._dy = this.position.y - this.prev.y;
+ this._dx = position.x - this.prev.x;
978
+ this._dy = position.y - this.prev.y;
979
980
var worldBlocked = this.worldBlocked;
981
0 commit comments