Skip to content

Commit 3d989e1

Browse files
committed
Arcade Physics World collideSpriteVsTilemapLayer now syncs the collision results back to the body, allowing you to call collide from within an update loop once again. Fix phaserjs#3999
1 parent 0399ca1 commit 3d989e1

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ Setting the `resolution` property in the Game Config to a value other than 1 wou
251251
* `Transform.getWorldTransformMatrix` has been recoded to iterate the transform parents correctly, applying the matrix multiplications as it goes. This (along with some changes in the Input Manager) fix the issue with Game Objects inside of Containers failing hit tests between certain angles. Fix #3920 (thanks @chaping @hackhat)
252252
* Calling Arcade Physics `collide` during an `update` method wouldn't inject the results back into the Body parent, causing the bodies to carry on moving. Using Colliders worked, but manually checking did not. Now, both methods work. Fix #3777 (thanks @samme)
253253
* The `setTintFill` method would ignore the `alpha` value of the Game Object in the shader. The alpha value is now blended with the tint fill, allowing you to properly alpha out tint-filled Game Objects. Fix #3992 (thanks @trl-bsd)
254+
* Arcade Physics World `collideSpriteVsTilemapLayer` now syncs the collision results back to the body, allowing you to call `collide` from within an update loop once again. Fix #3999 (thanks @nkholski @mikewesthad)
254255

255256
### Examples, Documentation and TypeScript
256257

src/physics/arcade/World.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,6 +2212,9 @@ var World = new Class({
22122212
{
22132213
sprite.emit('collide', body.gameObject, tile, body, null);
22142214
}
2215+
2216+
// sync changes back to the body
2217+
body.postUpdate();
22152218
}
22162219
}
22172220
},

0 commit comments

Comments
 (0)