Skip to content

Commit d710cae

Browse files
committed
Body.reset now resets the Body.speed value to zero.
1 parent 8dec371 commit d710cae

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Version 2.3.0 - "Tarabon" - in dev
8282
* Lots of JSDocs fixes (thanks @vulvulune @micahjohnston @Marchys)
8383
* TilemapLayer.getTiles now returns a copy of the Tiles found by the method, rather than references to the original Tile objects, so you're free to modify them without corrupting the source (thanks @Leekao #1585)
8484
* Sprite.events.onDragStart has 2 new parameters `x` and `y` which is the position of the Sprite before the drag was started. The full list of parameters is: `(sprite, pointer, x, y)`. This allows you to retain the position of the Sprite prior to dragging should `dragFromCenter` have been enabled (thanks @vulvulune #1583)
85+
* Body.reset now resets the Body.speed value to zero.
8586

8687
### Bug Fixes
8788

src/physics/arcade/Body.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ Phaser.Physics.Arcade.Body.prototype = {
618618
this.velocity.set(0);
619619
this.acceleration.set(0);
620620

621+
this.speed = 0;
621622
this.angularVelocity = 0;
622623
this.angularAcceleration = 0;
623624

0 commit comments

Comments
 (0)