Phaser 3 Arcade Physics TileMap collision

Hi, I came across this discussion trying to solve a similar problem, where my bullets would sometimes pass through walls, which were made from 96x96 tiles.

I couldn’t figure out what was going on, and I was getting pretty frustrated until I discovered this post:

This gave me the idea to add “tileBias” to my game config, such as:

{
    ...

    physics: {
        default: 'arcade',
        arcade: {
            gravity: { y: 1000 },
            tileBias: 96,
        }
    }
}

According to the Phaser documentation for tileBias: “The optimum value may be similar to the tile size”. The default value is 16, but since my tiles were 96, I changed it to that size. After doing that, my problem seems to be resolved.

I just wanted to pass this information along, in case anyone else looks here for the same issue.

2 Likes