You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be reproduced by using the mario collide example. Add a callback to physics.collide() and you'll see that it doesn't trigger when the player hits the ground or hit any tile perpendicularly. It will only trigger when hitting a corner of a sprite. Try standing right next to a green pipe, jump and when falling down move slightly towards the pipe.
In 1.1.5, the first few lines in ArcadePhysics.js:collideSpriteVsTilemapLayer() looks like this:
this._mapData = tilemapLayer.getTiles(sprite.body.left, sprite.body.top, sprite.body.width, sprite.body.height, true);
if (this._mapData.length === 0)
{
return;
}
if (this._mapData.length > 1)
{
this.separateTiles(sprite.body, this._mapData);
}
else
{
var i = 0;
if (this.separateTile(sprite.body, this._mapData[i]))
{
While, in 1.1.3 the same function starts with these lines:
this._mapData = tilemapLayer.getTiles(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height, true);
if (this._mapData.length === 0)
{
return;
}
for (var i = 0; i < this._mapData.length; i++)
{
if (this.separateTile(sprite.body, this._mapData[i]))
{
I tried fixing this by copy-pasting the lines from 1.1.3, and now the callback is triggered every time a sprite hits a tile.
The text was updated successfully, but these errors were encountered:
This can be reproduced by using the mario collide example. Add a callback to physics.collide() and you'll see that it doesn't trigger when the player hits the ground or hit any tile perpendicularly. It will only trigger when hitting a corner of a sprite. Try standing right next to a green pipe, jump and when falling down move slightly towards the pipe.
In 1.1.5, the first few lines in ArcadePhysics.js:collideSpriteVsTilemapLayer() looks like this:
While, in 1.1.3 the same function starts with these lines:
I tried fixing this by copy-pasting the lines from 1.1.3, and now the callback is triggered every time a sprite hits a tile.
The text was updated successfully, but these errors were encountered: