ArcadePhysics Body.rotation now reads its initial value from sprite.angle instead of sprite.rotation. The property was immediately replaced with the correct value in Body.preUpdate regardless, but it keeps it consistent (thanks @samme #2708)

This commit is contained in:
Richard Davey 2016-08-21 10:27:58 +01:00
parent 4382944a2e
commit 19342fa3af
2 changed files with 3 additions and 2 deletions

View file

@ -335,6 +335,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
* Animations now allow for speeds greater than 0, rather than forcing them to be greater than 1. This allows you to have animation speeds slower than 1 frame per second (thanks @jayrobin #2664)
* Weapon.fire and all related methods (fireAtXY, fireAtPointer, fireAtSprite) now all return the instance of the Phaser.Bullet that was fired, or `null` if nothing was fired. Previously it would return a boolean, but this change allows you to perform additional processing on the Bullet as required (thanks @JTronLabs #2696)
* Sound.loopFull now returns the Sound instance that was looped (thanks @hilts-vaughan #2697)
* ArcadePhysics Body.rotation now reads its initial value from sprite.angle instead of sprite.rotation. The property was immediately replaced with the correct value in Body.preUpdate regardless, but it keeps it consistent (thanks @samme #2708)
### Bug Fixes

View file

@ -82,13 +82,13 @@ Phaser.Physics.Arcade.Body = function (sprite) {
* itself never rotates, it is always axis-aligned. However these values are passed up to the parent Sprite and updates its rotation.
* @property {number} rotation
*/
this.rotation = sprite.rotation;
this.rotation = sprite.angle;
/**
* @property {number} preRotation - The previous rotation of the physics body.
* @readonly
*/
this.preRotation = sprite.rotation;
this.preRotation = sprite.angle;
/**
* @property {number} width - The calculated width of the physics body.